Time limit
2s
Memory limit
128 MB
You are given a sequence S. Choose one or more elements from S. Count how many choices have greatest common divisor 1 among the selected elements.
Elements at different positions are considered distinct, even when their values are equal.
The first line contains the size N of the sequence.
Each of the next N lines contains one element S_i of the sequence. The same value may appear more than once.
Print the number of valid choices modulo 10,000,003.
Consider every non-empty choice of elements, and count only the choices whose greatest common divisor is 1.