Codeforces user' handle color depends on his rating — it is red if his rating is greater or equal to 2400; it is orange if his rating is less than 2400 but greater or equal to 2200, etc. Each time participant takes part in a rated contest, his rating is changed depending on his performance.

Anton wants the color of his handle to become red. He considers his performance in the rated contest to be good if he outscored some participant, whose handle was colored red before the contest and his rating has increased after it.

Anton has written a program that analyses contest results and determines whether he performed good or not. Are you able to do the same?


-----Input-----

The first line of the input contains a single integer n (1 ≤ n ≤ 100) — the number of participants Anton has outscored in this contest .

The next n lines describe participants results: the i-th of them consists of a participant handle name_{i} and two integers before_{i} and after_{i} ( - 4000 ≤ before_{i}, after_{i} ≤ 4000) — participant's rating before and after the contest, respectively. Each handle is a non-empty string, consisting of no more than 10 characters, which might be lowercase and uppercase English letters, digits, characters «_» and «-» characters.

It is guaranteed that all handles are distinct.


-----Output-----

Print «YES» (quotes for clarity), if Anton has performed good in the contest and «NO» (quotes for clarity) otherwise.


-----Examples-----
Input
3
Burunduk1 2526 2537
BudAlNik 2084 2214
subscriber 2833 2749

Output
YES
Input
3
Applejack 2400 2400
Fluttershy 2390 2431
Pinkie_Pie -2500 -2450

Output
NO


-----Note-----

In the first sample, Anton has outscored user with handle Burunduk1, whose handle was colored red before the contest and his rating has increased after the contest.

In the second sample, Applejack's rating has not increased after the contest, while both Fluttershy's and Pinkie_Pie's handles were not colored red before the contest.

Difficulty: interview

Starter code:

Solutions:
read = lambda: map(int, input().split())
n = int(input())
for i in range(n):
    name, x, y = input().split()
    x, y = int(x), int(y)
    if x >= 2400 and y > x:
        print('YES')
        return
print('NO')

n = int(input())
for i in range(n):
    inp = input().split()
    if 2400 <= int(inp[1]) < int(inp[2]):
        print("YES")
        break
else:
    print("NO")

import sys
from math import *
n=int(input())
for i in range(n):
    a,b,c=map(str,input().split())
    if int(b)>=2400:
        if int(c)-int(b)>0:
            print('YES')
            return
print('NO')

n = int(input())
f = False
for i in range(n):
    q, w, e = input().split()
    if (int(w) >= 2400 and int(e) > int(w)):
        f = True
if f:
    print("YES")
else:
    print("NO")

n = int(input())
answer = "NO"
for _ in range(n):
    s = str(input())
    arr = s.split()
    a = int(arr[1])
    b = int(arr[2])

    if a >= 2400 and b > a:
        answer = "YES"

print(answer)

n = int(input())
for i in range(n):
    s = input().split()
    b = int(s[1])
    e = int(s[2])
    if b >= 2400 and e > b:
        print("YES")
        return
print('NO')


n = int(input())
a = [input().split() for i in range(n)]
if sum([int(a[i][1]) >= 2400 and int(a[i][2]) > int(a[i][1]) for i in range(n)]) >= 1:
	print("YES")
else:
	print("NO")

3
# Copyright (C) 2016 Sayutin Dmitry.
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License as
# published by the Free Software Foundation; version 3
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; If not, see <http://www.gnu.org/licenses/>.

def main():
    n = int(input())
    ans = False
    for i in range(n):
        name, old, new = input().split()
        old = int(old)
        new = int(new)
        if new > old and old >= 2400:
            ans = True
    print("YES" if ans else "NO")
        
main()


from collections import defaultdict, deque, Counter, OrderedDict
from bisect import insort, bisect_right, bisect_left
import threading, sys

def main():
    n = int(input())
    check = False
    for i in range(n):
        a,b,c = input().split()
        b,c = int(b),int(c)
        if b >= 2400 and c > b:
            check = True
    print("YES" if check else "NO")

def __starting_point():
    """sys.setrecursionlimit(400000)
    threading.stack_size(40960000)"""
    thread = threading.Thread(target=main)
    thread.start()
__starting_point()

n = int(input())

ans = "NO"

for i in range(n):
    L = list(input().split())
    if (int(L[1]) >= 2400 and int(L[2]) > int(L[1])):
        ans = "YES"
print(ans)


n = int(input())
works = False
for _ in range(n):
    name, start, end = input().split()
    start = int(start)
    end = int(end)
    works = works or (start >= 2400 and end > start)

print("YES" if works else "NO")


n = int(input())

for i in range(n):
	name, before, after = input().split()
	before = int(before)
	after = int(after)
	if before < after:
		if after >= 2400 and before >= 2400:
			print('YES')
			return
print('NO')


def is_red(x):
    return x >= 2400

n = int(input())
for i in range(n):
    s = input().split()
    a, b = int(s[1]), int(s[2])
    s = s[0]
    if is_red(a) and b > a:
        print("YES")
        return
print("NO")

n = int(input())
s = []
for i in range(n):
    s.append([i for i in input().split()])
for i in s:
    if int(i[1])>=2400 and int(i[2])>int(i[1]):
        print("YES")
        break
else:
    print("NO")


won = False
for i in range(int(input())):
    n, f, s = input().split()
    f = int(f)
    s = int(s)
    if s > f and f >= 2400:
        won = True
if won:
    print('YES')
else:
    print('NO')

n = int(input())

for _ in range(n):
    l = input().split()
    before = int(l[1])
    after = int(l[2])
    if 2400 <= before < after:
        print('YES')
        break
else:
    print('NO')


N=int(input())
ok=False
for _ in range(N):
    a,b,c=input().split()
    b=int(b)
    c=int(c)
    ok |= b >= 2400 and c > b
print("YES" if ok else "NO")

N = int(input())
for i in range(N):
    S, b, a = input().split()
    b, a = (int(n) for n in (b, a))
    if b >= 2400 and a > b:
        print('YES')
        break
else:
    print('NO')


n=int(input())
for _ in range(n):
    _,x,y=input().split()
    x=int(x)
    y=int(y)
    if x<y and x>=2400: print('YES'); break
else: print('NO')

n = int(input())
bad = True
for i in range(n):
    line = input().split()
    name, start, finish = line[0], int(line[1]), int(line[2])
    if start >= 2400 and finish > start:
        bad = False
if not bad:
    print("YES")
else:
    print("NO")


N = int(input())

ans = "NO"
for _ in range(N):
    handle, before, after = input().split()
    before, after = int(before), int(after)

    if before >= 2400 and after > before:
        ans = "YES"

print(ans)

n=int(input())
for i in range(n):
  a,b,c=input().split()
  if int(b)>2399 and int(c)>int(b): print("YES"); break
else: print("NO")

"""a,b,n,x = map(int,input().split())
list(map(int,input().split()))
[list(map(int,input().split())) for i in range(n)]"""
n = int(input())
nbai = [list(map(str,input().split())) for i in range(n)]
ans = 0
for i in range(n):
    if int(nbai[i][2]) > int(nbai[i][1]) and int(nbai[i][1]) > 2399:
        ans = 1
        break
if ans == 1:
    print("YES")
else:
    print("NO")

        


for _ in range(int(input())):
    name, before, after = input().split()
    before = int(before)
    after = int(after)
    if 2400 <= before < after:
        print("YES")
        return

print("NO")

n = int(input())

BASE = 2400

answer = False

for i in range(n):
    before, after = list(map(int, input().split()[1:3]))

    if before >= BASE and after - before > 0:
        answer = True
        break

print("YES" if answer else "NO")