A single point of time: 2.0 sec
Memory Limit: 512 MB
For arrays A , if I ≠ J and A I + A J is a prime number, then we said ( I , J ) is a prime number of prime numbers to calculate the array.
Input Format
A first input row n , represents the length of the array, the next n integers, the i number of representatives of A i .
( . 1 ≤ n- ≤ 100000 , 0 ≤ A I ≤ 100 )
Output Format
The number of prime numbers output array.
Sample
input
3 1 2 3
output
4
prompt
Sample Description: A . 1 + A 2 , A 2 + A . 1 , A 2 + A . 3 , A . 3 + A 2 are prime numbers, a total of four pairs.