Problem

6 /23


Based on the exam 2016 - 1

Problem

Given N pairs of numbers. From each pair, you need to choose one number so that the sum of the selected numbers is the largest possible and is not divisible by 4. In the first line, enter the number N, which does not exceed 100,000.
If there are no such numbers, output "NO".

The input is the number of pairs, then the pairs themselves.


Input
The first line specifies the number of pairs. The following lines contain the pairs themselves. Modulo numbers do not exceed 30,000.

Imprint
Output the answer to the problem.

 

Examples
# Input Output
1
6
1 2
4 9
3 5
7 2
4 4
2 2
29