Larry is learning difference arrays. However, he is not sure which elements needs to be changed for each range update.
He wants you to tell him which indices will be changed for each range update.
As a reminder, when adding a value to a subarray
, we add
to index
and subtract
from index
.
Input Specification
The first line will contain the integer
, the number of updates.
The next lines will each contain
integers
.
Output Specification
For each update, print which indices will the changed on its own line for Larry.
Sample Input
4
1 2
3 3
2 4
3 5
Sample Output
1 3
3 4
2 5
3 6
Comments