We are given a set of positive integers.
We would like to find a subset of , composed of as few elements as possible,
such that the only positive common divisor of all the elements of is 1.
Input
The first line of input contains one integer (),
the size of the set .
The second line contains a sequence of positive integers
() that represents the elements of the set .
Output
The only line of output should contain one integer: the size of the requested smallest
set or a single word BRAK (Polish for none) if the set does not exist.
Example
For the input data:
5
6 10 12 15 18
the correct result is:
3
whereas for the input data:
5
2 4 6 8 10
the correct result is:
BRAK
Task author: Jakub Lacki.
Kontakt
In the event of technical difficulties with Szkopuł, please contact us via email at [email protected].
If you would like to talk about tasks, solutions or technical problems, please visit our Discord servers. They are moderated by the community, but members of the support team are also active there.