Given an array of positive integers.
Omega of a number is defined as the set of prime numbers that divide .
Example:
Omega of 10 is [2,5], Omega of 1 is [], and Omega of 18 is [2,3].
The beauty of the array is defined as the product of the frequency of different omegas occurring in the array. Return the beauty of the given array (in Modulo ).
Input format
Output format
Constraints
Example: = [6, 18, 2, 4, 1, 8, 1]
Omega of 6 : [2,3]
Omega of 18 : [2,3]
Omega of 2 : [2]
Omega of 4 : [2]
Omega of 1 : []
Omega of 8 : [2]
Frequency of [2,3] = 2, frequency of [] = 2, and frequency of [2] = 3.
So beauty is 2*2*3 = 12.