#P1618F. Reverse

    ID: 6226 Type: RemoteJudge 2000ms 256MiB Tried: 0 Accepted: 0 Difficulty: (None) Uploaded By: Tags>bitmasksconstructive algorithmsdfs and similarimplementationmathstrings*2000

Reverse

No submission language available for this problem.

Description

You are given two positive integers xx and yy. You can perform the following operation with xx: write it in its binary form without leading zeros, add 00 or 11 to the right of it, reverse the binary form and turn it into a decimal number which is assigned as the new value of xx.

For example:

  • 3434 can be turned into 8181 via one operation: the binary form of 3434 is 100010100010, if you add 11, reverse it and remove leading zeros, you will get 10100011010001, which is the binary form of 8181.
  • 3434 can be turned into 1717 via one operation: the binary form of 3434 is 100010100010, if you add 00, reverse it and remove leading zeros, you will get 1000110001, which is the binary form of 1717.
  • 8181 can be turned into 6969 via one operation: the binary form of 8181 is 10100011010001, if you add 00, reverse it and remove leading zeros, you will get 10001011000101, which is the binary form of 6969.
  • 3434 can be turned into 6969 via two operations: first you turn 3434 into 8181 and then 8181 into 6969.

Your task is to find out whether xx can be turned into yy after a certain number of operations (possibly zero).

The only line of the input contains two integers xx and yy (1x,y10181 \le x, y \le 10^{18}).

Print YES if you can make xx equal to yy and NO if you can't.

Input

The only line of the input contains two integers xx and yy (1x,y10181 \le x, y \le 10^{18}).

Output

Print YES if you can make xx equal to yy and NO if you can't.

Samples

Sample Input 1

3 3

Sample Output 1

YES

Sample Input 2

7 4

Sample Output 2

NO

Sample Input 3

2 8

Sample Output 3

NO

Sample Input 4

34 69

Sample Output 4

YES

Sample Input 5

8935891487501725 71487131900013807

Sample Output 5

YES

Note

In the first example, you don't even need to do anything.

The fourth example is described in the statement.