Soup has recently learned about the concept of sexy primes. He has recently tasked you with writting a program that will output the number of pairs of sexy primes in a given array.
For all subtasks:
Subtask 1 [50%]
Subtask 2 [50%]
No further constraints.
The first line of input contains the integers , denoting the number of integers in the array
The following line contains integers, each denoting an element in the array.
Ouput a single integer denoting the number of pairs of sexy primes we can create using all the numbers in the array.
5 5 11 17 41 47
The pairs of sexy primes are:
6 5 5 5 11 11 11
We can make 9 pairs of the form , since each of the 3 s can be matched with each of the 3 s