Limits 1s, 256 MB

The ghost exploration team find some 1D coordinate where the cursed object is located. You will be given NN such cursed positions. All the locations are integers. You need to find the possible ghost spawning area using those cursed object positions.

The ghost has a special affection for numbers 11 to 99. An area is said to be a ghost spawning area if it is divisible by all the numbers from 11 to 99.

Being a member of the ghost exploration team, you need to find out the number of ways of selecting one or more cursed object locations from those NN locations such that the product of those locations returns a ghost spawning area.

Since the answer can be very big, output the answer modulo 109+710^9 + 7.

Input

The first line of input is an integer NN. The next line will contain NN different integer numbers.

Constraints

  • 1N1041 \leq N \leq 10^4

  • 1all cursed positions1041\leq\text{all cursed positions}\leq 10^4

Output

Print the number of ways of selecting one or more cursed object locations modulo 109+710^9 + 7 such that the product of those locations becomes a ghost spawning area.

Samples

InputOutput
7
1 2 3 4 5 6 7
4
InputOutput
6
1 2 3 4 5 6
0

Submit

Login to submit.

Statistics

76% Solution Ratio
AST_TheCoderEarliest, 7M ago
jahid_hridoyFastest, 0.0s
eshtiakhasan626Lightest, 5.2 MB
steinumShortest, 471B
Toph uses cookies. By continuing you agree to our Cookie Policy.