There are balls in a row. The ball has color . Your task is to destroy all the balls by using the following operation any number of times:
Assume that the current number of balls is . All the balls of color are destroyed at the same moment. In different scenarios, you are required to determine whether you can destroy all the balls or not.
Input format
Output format
For each test case, if all the balls can be destroyed, then print . Otherwise, .
Constraints
Initially, there are 6 balls. Now, all balls having color equal to 6 are destroyed together at the same moment. Now, there are 3 balls remaining.
All balls having color equal to 3 are destroyed together at this moment. Now, there is only 1 ball remaining. All balls having color equal to 1 are destroyed together at this moment.
After this operation, all balls have been destroyed. Thus, the answer is yes.