You once had a pair of integers $$(a_1, a_2)$$. You decided to have fun by adding a few next numbers, creating a sequence. The initial sequence is just $$(a_1, a_2)$$, then every new number is the sum of the previous two. For example, if a sequence is $$(10, 20)$$, a new number will be $$10 + 20 = 30$$. Then the sequence is $$(10, 20, 30)$$ and a new number will be $$20 + 30 = 50$$, and so on.
One day, you woke up only to find out that you had forgotten the initial pair $$(a_1, a_2)$$. Luckily, you happen to still remember values $$a_3$$ and $$a_4$$.
Given $$a_3$$ and $$a_4$$, determine $$a_1$$ and $$a_2$$.
Input
The first and only line contains two space-separated integers $$a_3$$ and $$a_4$$.
Output
Print two space-separated integers $$a_1$$ and $$a_2$$.
Please note that these numbers could be negative.
It can be proven that, under the given constraints, the answer always exists and is unique.
Constraints
$$1 \leq a_3, a_4 \leq 10^6$$
In tests worth 60 points in total, $$a_3, a_4 \leq 1\,000$$.
Note that the expected output feature for custom input is disabled for this contest.
Please login to use the editor
You need to be logged in to access the code editor
Loading...
Please wait while we load the editor
Login to unlock the editorial