In ACM-ICPC contests, there are usually three people in a team. For each person in the team, you know their scores in three skills - hard work, intelligence and persistence.
You want to check whether it is possible to order these people (assign them numbers from 1 to 3) in such a way that for each 1 ≤ i ≤ 2, i+1-th person is stricly better than the i-th person.
A person x is said to be better than another person y if x doesn't score less than y in any of the skills and scores more than y in at least one skill.
Determine whether such an ordering exists.

-----Input-----
The first line fo the input contains an integer T denoting the number of test cases.
Each test consists of three lines. Each of these lines contains three space separated integers s1, s2 and s3 denoting the scores of one member of the team in each of the three skills, in the given order.

-----Output-----
For each test case, output a single line containing "yes" if such an ordering exists or "no" if doesn't exist (without quotes).

-----Constraints-----
- 1 ≤ T ≤ 1000
- 1 ≤ s1, s2, s3 ≤ 100

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

Output
yes
no
yes

-----Explanation-----
Test Case 1: We can order them as (3, 2, 1). Person 3 is better than Person 2 because his scores in the first two skills are not lesser than Person 2's. And in skill 3, Person 3 scores higher. Similarly, Person 2 is better than Person 1. He scores more than Person 1 in every skill, in fact.

```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 = 'def is_better(x, y):\n # print("x y", x, y)\n for i in range(3):\n  if s[y][i] > s[x][i]:\n   # print("sd", i, s[y][i], s[x][i])\n   return 0\n \n for i in range(3):\n  if s[x][i] > s[y][i]:\n   # print("sank")\n   return 1\n \n # print("mon")\n return 0\n\nt = int(input())\n\nfor _ in range(t):\n # print("t", _)\n s = []\n \n for i in range(3):\n  s.append([int(x) for x in input().split()])\n  \n # print(s)\n \n f = -1\n m = -1\n \n flag = 1\n \n # if(f == -1):\n if(is_better(0, 1) and is_better(0, 2)):\n  f = 0\n elif(is_better(1, 0) and is_better(1, 2)):\n  f = 1\n elif(is_better(2, 0) and is_better(2, 1)):\n  f = 2\n else:\n  flag = 0\n \n if(f != -1):\n  temp = [0, 1, 2]\n  temp.remove(f)\n  \n  if(is_better(temp[0], temp[1])):\n   m = temp[0]\n  elif(is_better(temp[1], temp[0])):\n   m = temp[1]\n  else:\n   flag = 0\n \n if(flag == 0):\n  print("no")\n else:\n  print("yes")'
_co = compile(_CODE, USER_FILENAME, "exec")
exec(_co, ns, ns)

```

Measured memory_bytes: 13541