You are given an array A={a0,a1...aN−1} and an integer D. Find the total number of un-ordered pairs (i,j) where i≠j such that ai∗aj≡0(modD).
INPUT
The first line of each test file contains two space separated integers N and D, where N denotes the size of array A and D is as described above. Next line contains N space separated integers a0…aN−1 denoting array A .
OUTPUT
Output a single line containing the number of pairs as described in problem statement.
CONSTRAINTS
You can take number at index 4 (1 based indexing) with any of other 6 numbers. Their product will be divisible by D i.e. 7. No other pair will give product divisible by D.