Time limit
1s
Memory limit
128 MB
Consider an infinite binary tree built by the following rules. Each node stores an ordered pair of two integers.
Given a node, we want to find a shortest path from the root to that node. The path itself may be very long, so only the number of moves to a left child and the number of moves to a right child are required.
Given two integers A and B, write a program that computes how many times the shortest path from the root to the node storing (A, B) moves to a left child and to a right child.
The first line contains two integers A and B. (1 ≤ A, B ≤ 2,000,000,000)
No invalid input is given.
Print two integers L and R on the first line. L is the number of moves to a left child, and R is the number of moves to a right child.