An M-state affection list (with $M > 1$) is a sequence defined as follows: the first entry is the state “loves”, and the remaining $M-1$ entries are some other (distinct) affection states.
A girl reads a boy's feelings toward her by plucking, one at a time, the petals of a daisy he gives her, using the following rules:
For example, consider the $3$-state list “loves”-“likes”-“indifferent”. With this list, a daisy of $5$ petals gives the result “indifferent”, while a daisy of $7$ petals gives “likes”.
The girl believes the boy loves her only if he gives her daisies and every one of them points to the state “loves”. The boy wants to convince her, so he gives her $N$ daisies and wants to design the longest possible affection list.
For the given daisies, find the largest value of $M$ for which the girl concludes that the boy loves her.
The first line contains the number of daisies $N$ ($1 \le N \le 1000$). The second line contains $N$ integers $L_i$ ($1 \le L_i \le 100$) separated by spaces, where $L_i$ is the number of petals on the $i$-th daisy.
Print a single integer: the largest possible value of $M$. If the petal counts of the daisies share no common divisor greater than $1$, print $1$.