CSES - GCD Subsets
  • Time limit: 1.00 s
  • Memory limit: 512 MB

You are given an array of nn integers. Your task is to calculate the number of non-empty subsets whose elements' greatest common divisor is equal to kk for each k=1,,nk = 1,\dots, n.

Input

The first line has an integer nn: the size of the array.

The next line has nn integers x1,x2,,xnx_1, x_2,\dots, x_n: the contents of the array.

Output

Print nn integers as specified above modulo 109+710^9 + 7.

Constraints

  • 1n21051 \le n \le 2 \cdot 10^5
  • 1xin1 \le x_i \le n

Example

Input:

5
5 4 4 2 3

Output:

22 4 1 3 1