Consider a table G of size n×m such that G(i,j)=GCD(i,j) for all 1≤i≤n,1≤j≤m. GCD(a,b) is the greatest common divisor of numbers a and b.
You have a sequence of positive integer numbers a1,a2,...,ak. We say that this sequence occurs in table G if it coincides with consecutive elements in some row, starting from some position. More formally, such numbers 1≤i≤n and 1≤j≤m-k+1 should exist that G(i,j+l-1)=al for all 1≤l≤k.
Determine if the sequence a occurs in table G.
Output
Print a single word "
YES", if the given sequence occurs in table
G, otherwise print "
NO".
Note
Sample 1. The tenth row of table
G starts from sequence {1, 2, 1, 2, 5, 2, 1, 2, 1, 10}. As you can see, elements from fifth to ninth coincide with sequence
a.
Sample 2. This time the width of table
G equals 8. Sequence
a doesn't occur there.