By Roger Eliodoro Condras, UFSC-ARA Brazil
As stated in the title of the problem, not all problems will be about the strike, and this particular problem will be quite easy. Given a list of any positive integers, your task will be to tell how many and which of those numbers are prime. Just to say it's too easy, print the list in ascending order without repetition, as the same number may appear more than once in the entry.
Just to remember, a prime number is that number that is divisible only by 1 and by itself.
The first line has an integer N (1 ≤ N ≤ 1.000) that indicates how many numbers the list has. The next N lines have an integer X (0 ≤ X ≤ 109 + 7). Each of the numbers to check.
Print a line with an integer Y, the total of different prime numbers in the list. On the next line print the Y prime numbers from the list, separated by a comma and a blank space. After the last number in the list print a full stop. Don't forget the "\ n" at the end. If there is no prime number in the list, leave the second line of the output blank.
|Input Sample||Output Sample|