CF338D GCD Table
Description
Consider a table $ G $ of size $ n×m $ such that $ G(i,j)=GCD(i,j) $ for all $ 1
Input Format
The first line contains three space-separated integers $ n $ , $ m $ and $ k $ ( $ 1
Output Format
Print a single word "YES", if the given sequence occurs in table $ G $ , otherwise print "NO".
Explanation/Hint
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.