Swap Without Temp

MEDIUM · C · 2000ms

A faulty wire means Nusrat can't use a temporary register when swapping two sensor values — she must swap them using pure XOR tricks. Read two integers A and B, swap their values using XOR (no temporary variable), and print them in swapped order.

Input

Two integers A B.

Output

B and A (swapped), space-separated.

Constraints

0 ≤ A,B ≤ 10^9

Sample Input

5 9

Sample Output

9 5
main.c
Loading editor…

Write C, then Run (custom I/O) or Submit (sample tests). ⌘/Ctrl+Enter submits.

Swap Without Temp · DIU ContestHub