Consider an array A of size N. You start from the index 0 and your goal is to reach index in exactly M moves.
At any index, you can move forward or backward by a number of steps that is equal to a prime divisor of the value which exists at that index. You cannot go beyond the array while going forward or backward.
Write a program to determine whether it is possible to reach index in M moves.
Input format
Output format
For each test case, print YES or NO depending upon the result.
Constraints
In testcase 1 you can directly jump from position 0 to position 2.