New Year's Toys
Easy
Execution time limit is 1 second
Runtime memory usage limit is 64 megabytes
Every holiday has one downside – it eventually comes to an end. The New Year holidays are over, and young Dmytryk needs to pack his toys into boxes. He has placed some toys in one box and some in another. Dmytryk's older brother, Petryk, who studies mathematics, is curious to know if it's possible to move all the toys into one box. Each box can accommodate all the toys, and you can transfer as many toys from one box to the other as there are currently in the other box.
Input
Two numbers, N
and M
, represent the number of toys in the first and second box, respectively (1 ≤ N, M ≤ 2,000,000,000).
Output
Print 1 if it is possible to consolidate all the toys into one box, or 0 if it is not possible.
Examples
Input #1
Answer #1
Submissions 1K
Acceptance rate 18%