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
W razie problemów technicznych ze Szkopułem, prosimy o kontakt mailowy pod adresem szkopul@fri.edu.pl.
Jeśli chciałbyś porozmawiać o zadaniach, rozwiązaniach lub problemach technicznych, odwiedź nasze serwery na Discordzie. Są one moderowane przez społeczność, ale członkowie zespołu wsparcia również aktywnie się tam udzielają.