#P1618F. Reverse
Reverse
No submission language available for this problem.
Description
You are given two positive integers and . You can perform the following operation with : write it in its binary form without leading zeros, add or to the right of it, reverse the binary form and turn it into a decimal number which is assigned as the new value of .
For example:
- can be turned into via one operation: the binary form of is , if you add , reverse it and remove leading zeros, you will get , which is the binary form of .
- can be turned into via one operation: the binary form of is , if you add , reverse it and remove leading zeros, you will get , which is the binary form of .
- can be turned into via one operation: the binary form of is , if you add , reverse it and remove leading zeros, you will get , which is the binary form of .
- can be turned into via two operations: first you turn into and then into .
Your task is to find out whether can be turned into after a certain number of operations (possibly zero).
The only line of the input contains two integers and ().
Print YES if you can make equal to and NO if you can't.
Input
The only line of the input contains two integers and ().
Output
Print YES if you can make equal to and NO if you can't.
Samples
Note
In the first example, you don't even need to do anything.
The fourth example is described in the statement.