Two players are playing a game. The game is played on a sequence of positive integer pairs. The players make their moves alternatively. During his move the player chooses a pair and decreases the larger integer in the pair by a positive multiple of the smaller integer in the pair in such a way that both integers in the pair remain positive. If two numbers in some pair become equal then the pair is removed from the sequence. The player who can not make any move loses (or in another words the player who encounters an empty sequence loses). Given the sequence of positive integer pairs determine whether the first player can win or not (assuming that both players are playing optimally).

-----Input-----
The first line of the input contains an integer T denoting the number of test cases. The description of T test cases follows.
Each test starts with an integer N denoting the number of pairs. Each of the next N lines contains a pair of positive integers. 

-----Output-----
For each test case, output a single line containing "YES" if the first player can win and "NO" otherwise. 

-----Constraints-----
- 1 ≤ T ≤ 100
- 1 ≤ N ≤ 100
- All other integers are between 1 to 108
- The integers in each pair will be different

-----Example-----
Input:
3
1
2 3
2
4 5
5 6
2
2 3
3 5

Output:
NO
NO
YES


-----Explanation-----
Example case 1. The first player don't have any choice other subtracting 2 from 3. So during the turn of the second player integer pair will be (2,1). The second player will win by subtracting 1 from 2. 
Example case 2. If the first player choose to move (4,5) to (4,1) the second player will make it to (1,1). If the first player choose to move (5,6) to (5,1) the second player will make it to (1,1). So regardless of the move of the first player, the second will always win.
Example case 3. The first player will select pair (3,5) and make it to (3,2). Now both pairs are equal. So whatever the move of second player he will just mirror that move in another pair. This will ensure his win.

```python

USER_FILENAME = "<user_code>"
import sys, json, builtins
import math, heapq, bisect, itertools, functools, collections, statistics, fractions, decimal, operator, array, random, re, string, os, pathlib
try:
    import resource as _res
except Exception:
    _res = None
from collections import Counter, defaultdict, deque, OrderedDict
from functools import lru_cache, reduce
from itertools import accumulate, permutations, combinations, product
from math import gcd, ceil, floor, sqrt
from decimal import Decimal
try:
    from typing import *
except Exception:
    pass
try:
    sys.setrecursionlimit(1_000_000)
except Exception:
    pass
try:
    import site as _site
    try:
        _sys_sites = _site.getsitepackages() if hasattr(_site, "getsitepackages") else []
        for _p in _sys_sites:
            if _p and _p not in sys.path:
                sys.path.append(_p)
    except Exception:
        pass
    try:
        _usp = _site.getusersitepackages()
        if isinstance(_usp, str):
            _usp = [_usp]
        for _p in _usp:
            if _p and _p not in sys.path:
                sys.path.append(_p)
    except Exception:
        pass
except Exception:
    pass

ns = {"__name__": "__main__"}
for _k, _v in list(globals().items()):
    if not _k.startswith("_"):
        ns[_k] = _v
_CODE = 'import sys\n\nt = int(input())\n\ndef g(a,b):\n if (a > b):\n  tmp = a\n  a = b\n  b = tmp\n if (b == a):\n  return 0\n if (b % a == 0):\n  return int(b/a)-1\n r = g(b%a,a)\n q = int(b/a)\n if (r >= q):\n  return q-1\n else:\n  return q\n\ndef mex(x):\n n = len(list(x.keys()))\n for i in range(n):\n  if (i not in x):\n   return i\n return i\n\ndef g2(a,b):\n if (a == b):\n  return 0\n if (a > b):\n  tmp = a\n  a = b\n  b = tmp\n if (b % a == 0):\n  return int(b/a)-1\n q = int(b/a)\n x = {}\n r = b % a\n for i in range(q):\n  x[g2(r+i*a,a)] = True\n return mex(x)\n\n#print(str(g(6,33))+" "+str(g2(6,33)))\n\nwhile (t):\n\n n = int(input())\n x = 0\n while (n):\n  line = input().split()\n  a = int(line[0])\n  b = int(line[1])\n  x ^= g(a,b)\n  n -= 1\n if (x):\n  sys.stdout.write("YES\\n")\n else:\n  sys.stdout.write("NO\\n")\n #print(str(g(a,b)) + " " + str(g2(a,b)))\n t -= 1'
_co = compile(_CODE, USER_FILENAME, "exec")
exec(_co, ns, ns)

```

Measured memory_bytes: 13125