I I U P C 2 0 0 6

Problem C: Composite Prime

Input: standard input
Output: standard output

 

A prime number is a number that cannot be factored. More precisely, a number p is a prime if it has only the trivial divisors i.e. 1 and p. The set of prime numbers is a subset of the set of natural numbers (the set of natural numbers is normally denoted by N).

 

Let us consider another subset of N. Let us call this set M. A number m is a member of M if m = x × y where x > 1 and y > 1. Both x and y are natural numbers.

 

You have to find the prime numbers for this new set of number. Let us call these numbers composite prime. A composite prime is a number in M that does not have any divisor (except itself) in the set M.

 

Note: 1 is the first positive natural number and this is not a prime but in new number set first number is 4 and you have to keep in mind that this is the first composite prime.

 

Input

The input consists of several test cases. First line of each test case contains one integer K. In the next line there are K positive integers. Input will be terminated by end-of-file.

 

Output

For each test case, print one line containing a single integer which indicates the number of composite primes in the input.

 

Constraints

-           All the numbers in the input including K is less than 220

 

Sample Input

Output for Sample Input

4
3 4 6 8
5
12 13 21 22 23

2
2

 

Problemsetter: Md. Erfanul Hoque Siddiqi

Alternate Solution: Tanveer Ahsan