Simon has bought a box of chocolate and has brought them to Amanda's house. There is a random number on each chocolate. They decided to play a game with them.
They arranged them randomly in a row. They each start from one end of the row (Simon starts from left and Amanda from right). They can only move towards each other, and in each step, they can move at most k chocolate.
More specifically Simon can go from the ith place to one of i+1, i+2, ..., i+k and Amanda can go from ith place to i−1, i−2, ..., i−k.
They can only eat the chocolate they are on if their number is the same. The game ends if they can eat any chocolate. Their goal is to eat the last chocolate together.
Determine if Simon and Amanda can eat the last chocolate together (that is, they both finish in the same place).
Note that in the initial state, they are on the first and nth place but they did not eat chocolates yet. So, if the number of the first and nth place chocolate differs, the game ends and they would not reach each other. Also, at each moment, they both have to move simultaneously, that is, one cannot stay at a place while another one is moving because if one stays at the ith place, there is not any chocolate to eat anymore.
Input format
Output format
Print "YES" if they can eat the last chocolate together and "NO" if they cannot.
Note: The letters in the words "YES" and "NO" should be uppercase.
Constraints
1≤n≤1000
1≤k≤5
1≤Ai≤10
Simon's path would be: A1,A2,A4,A6
Amanda's path would be: A10,A9,A8,A6