Denis has ** N** boxes (

**even), and each box contains**

`N`**marbles which are either black or white. He knows for each box how many black marbles it contains and how many white marbles it contains. He now wants to split the**

`M`**boxes into**

`N`**groups, each containing**

`2`**boxes, such that the sum of the black marbles in the first group, and the white marbles in the second group is maximum.**

`N/2`### Input

The first line of input contains ** N** and

**, in this order.**

`M`The following

**lines contain two positive integers each, denoting the number of white marbles and the number of black marbles that are in each box.**

`N`### Output

On a single line print two integers separated by space: the number of black marbles in the first group and the number of white marbles in the second group.

### Constraints

`1 ≤ N ≤ 10`^{5}`0 ≤ M ≤ 10`^{4}- The solution is unique.

### Sample

Input | Output |
---|---|

4 30 3 3 0 1 2 2 1 | 5 5 |