Cards#3012

Cards

1 second
64 megabytes
Very hard

Adam has a fancy for numbers. Once, he found a batch of empty paper cards in his drawer, wrote random numbers on both sides of each card, and thought of the following puzzle: what is the smallest possible value that can be obtained by putting all cards in an arbitrary order (and flipping them if necessary) into the expression of the following form:

After a while, Adam came up with a solution. Could you do that too? Write a program to solve the puzzle described above.

Input

The first line contains a single integer (2 \leq N \leq 100\,000, is an even integer) — the number of cards. Each of the following lines contains two integers a_i and b_i (-2000 \leq a_i, b_i \leq 2000; i = 1\ldots N). These are the numbers written on both sides of the -th card.

Output

The only line should contain the minimal value that can be obtained by placing all the cards into the expression as described above.

Examples

Example 1

Loading
Loading

Note

1: Cards are put into the expression in this order: , , , , , .

(-8) - 5 + (-3) - 7 + (-7) - 4 = -34

2: Cards are put into the expression in this order: , , , , , , , , , .

62 - 70 + 59 - 81 + 40 - 76 + 35 - 85 + 57 - 96 = -155