- Time limit: 1.00 s
- Memory limit: 512 MB
You are given an array of integers. Your task is to calculate the number of non-empty subsets whose elements' greatest common divisor is equal to for each .
Input
The first line has an integer : the size of the array.
The next line has integers : the contents of the array.
Output
Print integers as specified above modulo .
Constraints
Example
Input:
5 5 4 4 2 3
Output:
22 4 1 3 1