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: EASY

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


n = int(input())
a = []
for i in range(n):
	a.append([str(x) for x in input().split()])
	(a[i][1], a[i][2]) = (int(a[i][1]), int(a[i][2]))
c = 0
for i in range(n):
	if a[i][1] >= 2400 and a[i][2] > a[i][1]:
		print('YES')
		c = 1
		break
if c == 0:
	print('NO')


n = int(input())
flag = 0
for i in range(n):
	(s, pr, af) = input().split()
	pr = int(pr)
	af = int(af)
	if pr >= 2400 and af > pr:
		flag = 1
		print('YES')
		break
if flag == 0:
	print('NO')


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


n = int(input())
w = False
for loop in range(n):
	(_, avant, apres) = input().split()
	avant = int(avant)
	apres = int(apres)
	if avant >= 2400 and apres > avant:
		w = True
if w:
	print('YES')
else:
	print('NO')


n = int(input())
cnt = 0
for i in range(n):
	(a, b, c) = input().split()
	b = int(b)
	c = int(c)
	if b >= 2400 and c > b:
		cnt += 1
if cnt > 0:
	print('YES')
else:
	print('NO')


def p1():
	n = int(input())
	ans = 'NO'
	for i in range(n):
		s = input().split()
		a = int(s[1])
		b = int(s[2])
		s = s[0]
		if a >= 2400 and a < b:
			ans = 'YES'
	print(ans)
p1()


loops = int(input())
printNo = True
for i in range(0, loops):
	a = [str(x) for x in input().split()]
	prev = int(a[1])
	nxt = int(a[2])
	if prev >= 2400 and nxt > prev:
		printNo = False
if printNo:
	print('NO')
else:
	print('YES')


ans = 'NO'
for i in range(int(input())):
	(s, a, b) = (x for x in input().split())
	if int(a) >= 2400 and int(b) > int(a):
		ans = 'YES'
print(ans)


t = int(input())
for z in range(t):
	(n, b, a) = input().split()
	b = int(b)
	a = int(a)
	c = 0
	if b >= 2400 and a > b:
		print('YES')
		c += 1
		break
if c == 0:
	print('NO')


n = int(input())
for i in range(n):
	(old, new) = (int(x) for x in input().strip().split()[1:])
	if old >= 2400 and new > old:
		print('YES')
		exit()
print('NO')


x = int(input())
t = 0
for i in range(x):
	y = input().split()
	if int(y[1]) >= 2400:
		if int(y[2]) > int(y[1]):
			t = 1
if t == 1:
	print('YES')
else:
	print('NO')


import math, sys, re, itertools
(rs, ri, rai) = (input, lambda : int(input()), lambda : list(map(int, input().split())))
n = ri()
f = False
for l in sys.stdin.readlines():
	l = l.split()
	(bef, aft) = (int(l[1]), int(l[2]))
	if bef >= 2400 and aft > bef:
		f = True
		break
print('YES' if f else 'NO')


x = int(input())
flag = 0
for i in range(x):
	a = input()
	l = [n for n in a.split()]
	n = int(l[1])
	m = int(l[2])
	if n < m and n >= 2400:
		flag = 1
if flag:
	print('YES')
else:
	print('NO')


count = int(input())

def run():
	for _ in range(count):
		(b, a) = (int(x) for x in input().split()[1:])
		if a > b >= 2400:
			print('YES')
			return
	print('NO')
run()


n = int(input())
list1 = []
count = 0
for i in range(n):
	(stri, a, b) = map(str, input().split())
	a = int(a)
	b = int(b)
	if b > a >= 2400 and a != b:
		count += 1
if count > 0:
	print('YES')
else:
	print('NO')


answer = 'NO'
n = int(input())
for i in range(n):
	record = input().split()
	if int(record[1]) >= 2400 and int(record[2]) - int(record[1]) > 0:
		answer = 'YES'
print(answer)


par = []
x = 0
for p in range(int(input())):
	par.append(input().split())
for pa in par:
	if int(pa[1]) >= 2400 and int(pa[2]) > int(pa[1]):
		x = 1
		break
if x == 1:
	print('YES')
else:
	print('NO')


x = int(input())
active = False
for value in range(1, x + 1):
	(x, y, z) = input().split()
	if int(y) >= 2400 and int(z) > int(y):
		active = True
if active:
	print('YES')
else:
	print('NO')


def main():
	n = int(input())
	for i in range(n):
		line = input().split()
		if int(line[2]) > int(line[1]) >= 2400:
			print('YES')
			return
	print('NO')
main()


n = input()
n = int(n)
flag = 0
for i in range(n):
	temp = input().split()
	for j in range(1, 3):
		temp[j] = int(temp[j])
	if temp[1] >= 2400 and temp[2] > temp[1]:
		flag = 1
if flag == 1:
	print('YES')
else:
	print('NO')


n = int(input())
for _ in range(n):
	(s, b, a) = input().split()
	if int(b) >= 2400 and int(a) > int(b):
		print('YES')
		quit()
print('NO')


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


def checkPerformance(contestants):
	for contestand in contestants:
		if contestand[1] >= 2400 and contestand[2] > contestand[1]:
			return 'YES'
	return 'NO'
testCases = int(input())
contestants = []
for test in range(testCases):
	contestant = input().split()
	contestant[1] = int(contestant[1])
	contestant[2] = int(contestant[2])
	contestants.append(contestant)
print(checkPerformance(contestants))


n = int(input())
f = False
for i in range(n):
	a = list(input().split())
	if int(a[1]) >= 2400 and int(a[1]) < int(a[2]):
		f = True
print('YES' if f else 'NO')


n = int(input())
(l, count) = ([], 0)
for _ in range(n):
	l = [ele for ele in input().split()]
	if int(l[1]) >= 2400:
		if int(l[2]) - int(l[1]) > 0:
			count += 1
if count != 0:
	print('YES')
else:
	print('NO')


def R():
	return map(int, input().split())

def I():
	return int(input())

def S():
	return str(input())

def L():
	return list(R())
from collections import Counter
import math
import sys
from itertools import permutations
import bisect
n = I()
for i in range(n):
	(s, r1, r2) = input().split()
	r1 = int(r1)
	r2 = int(r2)
	if 2400 <= r1 < r2:
		print('YES')
		exit()
print('NO')


flag = 0
for _ in range(int(input())):
	(q, a, b) = [str(x) for x in input().split()]
	a = int(a)
	b = int(b)
	if a >= 2400 and b - a > 0:
		flag = 1
print('YES' if flag else 'NO')


n = input()
n = int(n)
a = []
for i in range(0, n):
	(t1, t2, t3) = input().split()
	a.append(str(t1))
	a.append(int(t2))
	a.append(int(t3))
y = 0
for i in range(0, len(a), 3):
	if a[i + 1] >= 2400:
		if a[i + 1] < a[i + 2]:
			y = 1
			break
		else:
			y = 0
if y == 1:
	print('YES')
else:
	print('NO')


n = int(input())
s = 'NO'
for _ in range(n):
	(name, rb, ra) = input().split()
	if int(rb) >= 2400 and int(ra) > int(rb):
		s = 'YES'
		break
print(s)


ip = []
count = 0
for i in range(int(input())):
	(s, a, b) = input().split()
	a = int(a)
	b = int(b)
	ip.append((a, b))
for i in ip:
	(a, b) = i
	if a >= 2400:
		red = 1
	else:
		red = 0
	if b > a:
		inc = 1
	else:
		inc = 0
	if red == 1 and inc == 1:
		count += 1
	if count == 1:
		print('YES')
		break
	else:
		continue
if count == 0:
	print('NO')


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


n = int(input())
t = 0
for i in range(n):
	(_, b, c) = input().split()
	if int(c) > int(b) and int(b) >= 2400:
		t = 1
print(['NO', 'YES'][t == 1])


s = 'NO'
for _ in range(int(input())):
	(_, b, c) = input().split()
	if int(c) > int(b) > 2399:
		s = 'YES'
		break
print(s)


n = int(input())
ans = 'NO'
for i in range(n):
	(s, a, b) = input().split()
	a = int(a)
	b = int(b)
	if 2400 <= a < b:
		ans = 'YES'
print(ans)


n = int(input())
no = 1
for i in range(n):
	k = input().split()
	if int(k[1]) >= 2400 and int(k[1]) < int(k[2]):
		print('YES')
		no = 0
		break
if no == 1:
	print('NO')


n = int(input())
arr3 = []
for _ in range(n):
	arr3.append(input().split())
for i in arr3:
	if int(i[1]) >= 2400 and int(i[2]) > 2400 and (i[2] > i[1]):
		print('YES')
		exit()
print('NO')


def has_outscored(scores):
	for score in scores:
		if score[1] >= 2400 and score[2] > score[1]:
			return True
	return False
scores = []
for _ in range(int(input())):
	elements = input().split()
	scores.append([elements[0], int(elements[1]), int(elements[2])])
print('YES' if has_outscored(scores) else 'NO')


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())
answer = 'NO'
for i in range(n):
	(s, before, after) = input().split()
	(before, after) = (int(before), int(after))
	if before >= 2400 and after - before > 0:
		answer = 'YES'
print(answer)


n = int(input())
res = False
for i in range(n):
	(h, s1, s2) = input().split()
	(s1, s2) = (int(s1), int(s2))
	if s1 >= 2400 and s2 > s1:
		res = True
print('YES' if res else 'NO')


for i in range(int(input())):
	(_, b, c) = input().split()
	if int(c) > int(b) > 2399:
		print('YES')
		exit(0)
print('NO')


n = int(input())
flag = 0
for i in range(n):
	(name, rb, ra) = map(str, input().split())
	if int(rb) >= 2400 and int(rb) < int(ra):
		print('YES')
		flag = 1
		break
if flag == 0:
	print('NO')


for i in range(int(input())):
	(a, b) = map(int, input().split()[1:])
	if 2399 < a < b:
		print('YES')
		exit(0)
print('NO')


N = int(input())
flag = 'NO'
for i in range(N):
	data = list(map(str, input().split(' ')))
	if int(data[1]) >= 2400 and int(data[1]) < int(data[2]):
		flag = 'YES'
print(flag)


n = int(input())
pd = 0
for i in range(0, n):
	s = input().split()
	if int(s[1]) >= 2400 and int(s[2]) > int(s[1]):
		print('YES')
		pd = 1
		break
if pd == 0:
	print('NO')


t = int(input())
ok = 0
for items in range(t):
	(name, before, after) = input().split()
	if int(after) > int(before) >= 2400:
		ok = 1
		break
if ok:
	print('YES')
else:
	print('NO')


n = int(input())
flag = False
for i in range(n):
	(name, bef, aft) = input().split()
	bef = int(bef)
	aft = int(aft)
	if bef >= 2400 and aft - bef > 0:
		flag = True
		break
if flag:
	print('YES')
else:
	print('NO')


n = int(input())
ans = 0
for i in range(n):
	(n, a, b) = map(str, input().split())
	if int(a) >= 2400 and int(b) - int(a) > 0:
		ans += 1
if ans == 0:
	print('NO')
else:
	print('YES')


bl = 'NO'
for _ in range(int(input())):
	(_, x, y) = input().split()
	if int(y) > int(x) >= 2400:
		bl = 'YES'
print(bl)


n = int(input())
p = 'NO'
for i in range(n):
	l = list(input().split())
	if p == 'NO' and 2400 <= int(l[1]) < int(l[2]):
		p = 'YES'
print(p)


num = int(input(''))
dat = []
fin = 0
for i in range(num):
	dat.append(list(input('').split()))
for i in dat:
	i[1] = int(i[1])
	i[2] = int(i[2])
	if i[1] < 2400:
		fin = 0
		continue
	elif i[1] < i[2]:
		fin = 1
		break
	else:
		continue
if fin == 0:
	print('NO')
else:
	print('YES')


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


import sys
n = int(sys.stdin.readline().rstrip())
l = []
for i in range(n):
	temp = []
	temp = [x for x in sys.stdin.readline().rstrip().split()]
	temp1 = []
	temp1.append(temp[0])
	temp1.append(int(temp[1]))
	temp1.append(int(temp[2]))
	l.append(temp1)
flag = False
for i in range(len(l)):
	if l[i][1] >= 2400 and l[i][2] > l[i][1]:
		flag = True
		break
if flag:
	print('YES')
else:
	print('NO')


for i in range(int(input())):
	l = list(map(str, input().split()))
	if int(l[1]) >= 2400 and int(l[2]) > int(l[1]):
		print('YES')
		exit()
print('NO')


n = int(input())
success = False
for i in range(n):
	(name, before, after) = input().split()
	if not success:
		if 2400 <= int(before) < int(after):
			success = True
if success:
	print('YES')
else:
	print('NO')


found = False
for _ in range(int(input())):
	s = input().split()
	s1 = int(s[1])
	s2 = int(s[2])
	if s1 >= 2400 and s2 > s1:
		found = True
print('YES' if found else 'NO')


t = int(input())
c = 0
while t:
	t -= 1
	(s, i, f) = input().split()
	(i, f) = (int(i), int(f))
	if i >= 2400 and f - i > 0:
		c += 1
if c != 0:
	print('YES')
else:
	print('NO')


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


n = int(input())
finished = False
ans = 'NO'
while n > 0:
	lst = [str(x) for x in input().split()]
	if not finished:
		prev = int(lst[1])
		after = int(lst[2])
		if prev >= 2400 and after > prev:
			finished = True
			ans = 'YES'
	n = n - 1
print(ans)


n = int(input())
output = 'NO'
for j in range(n):
	(name, prev, curr) = [str(j) for j in input().split()]
	if int(curr) - int(prev) > 0 and int(prev) >= 2400:
		output = 'YES'
print(output)


import math
t = int(input())
r = 0
while t > 0:
	(a, b, c) = map(str, input().split())
	b = int(b)
	c = int(c)
	if b >= 2400 and c - b > 0:
		r = 1
	t = t - 1
if r == 1:
	print('YES')
else:
	print('NO')


n = int(input())
di = {}
for i in range(n):
	(handle, bc, ac) = map(str, input().split())
	if handle not in di:
		ar = []
		ar.append(int(bc))
		ar.append(int(ac))
		di[handle] = ar

def solve(di):
	for i in di.keys():
		if di[i][0] >= 2400 and di[i][1] > di[i][0]:
			return 'YES'
	return 'NO'
print(solve(di))


for _ in range(int(input())):
	(_, bef, aft) = input().split()
	if int(bef) < int(aft) and int(bef) >= 2400:
		print('YES')
		quit()
print('NO')


def answer():
	n = int(input())
	c = []
	while n:
		a = [int(x) for x in input().split()[1:]]
		c.append(a)
		n -= 1

	def myfunc(e):
		return e[0]
	c.sort(key=myfunc)
	c.reverse()
	i = 0
	done = 0
	while i < len(c):
		if c[i][0] >= 2400 and c[i][1] > c[i][0]:
			print('YES')
			done = 1
			break
		i += 1
	if not done:
		print('NO')
answer()


def contest(lst):
	flag = 0
	for elem in lst:
		if int(elem[1]) >= 2400 and int(elem[2]) > int(elem[1]):
			flag = 1
	if flag == 1:
		return 'YES'
	return 'NO'
n = int(input())
a = list()
for i in range(n):
	s = [x for x in input().split()]
	a.append(s)
print(contest(a))


n = int(input())
ans = False
for _ in range(n):
	(n, a, b) = map(str, input().split())
	a = int(a)
	b = int(b)
	if b > a and a >= 2400:
		ans = True
print('YES' if ans else 'NO')


def main():
	n = int(input())
	res = 'NO'
	for _ in range(n):
		(name, before, after) = input().split()
		(before, after) = map(int, (before, after))
		if 2400 <= before < after:
			res = 'YES'
	print(res)
main()


answer = 'NO'
for _ in range(int(input())):
	s = list(map(str, input().split()))
	if int(s[1]) >= 2400:
		if int(s[2]) > int(s[1]):
			answer = 'YES'
print(answer)


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


ok = False
t = int(input())
for _ in range(t):
	(n, b, a) = input().split()
	b = int(b)
	a = int(a)
	if b >= 2400 and a > b:
		ok = True
print('YES' if ok else '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())
flag = False
for i in range(n):
	(name, before, after) = map(str, input().split())
	before = int(before)
	after = int(after)
	if before >= 2400 and after > before:
		flag = True
if flag:
	print('YES')
else:
	print('NO')


n = int(input())
flag = 'NO'
for i in range(n):
	(text, f, s) = input().split()
	if int(s) > int(f) >= 2400:
		flag = 'YES'
print(flag)


__author__ = 'aste'

def main():
	n = int(input())
	good = False
	for i in range(0, n):
		(name, b, a) = input().split()
		b = int(b)
		a = int(a)
		if 2400 <= b < a:
			good = True
			break
	print(good and 'YES' or 'NO')
main()


n = int(input())
flag = False
for i in range(n):
	info = input().split(' ')
	(bf, af) = map(int, info[1:])
	if bf >= 2400 and af > bf:
		flag = True
if flag:
	print('YES')
else:
	print('NO')


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')
thread = threading.Thread(target=main)
thread.start()


j = 0
for i in range(int(input())):
	a = input().split()
	b = int(a[1])
	c = int(a[2])
	if b >= 2400 and c > b:
		j = 1
		break
if j == 1:
	print('YES')
else:
	print('NO')


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


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


t = []
for i in range(int(input())):
	(s, a, b) = input().split()
	a = int(a)
	b = int(b)
	if a >= 2400 and b > a:
		t.append(s)
if len(t) > 0:
	print('YES')
else:
	print('NO')


import sys
n = int(sys.stdin.readline())
for i in range(n):
	(handle, before, after) = sys.stdin.readline().split()
	(before, after) = map(lambda x: int(x), [before, after])
	if before >= 2400 and after > before:
		print('YES')
		exit()
print('NO')


a = int(input())
k = 0
for i in range(a):
	S = input().split()
	if int(S[1]) >= 2400 and int(S[2]) > int(S[1]):
		print('YES')
		k = 1
		break
if k == 0:
	print('NO')


n = int(input())
b = False
for i in range(1, n + 1):
	a = list(map(int, input().split(' ')[1:]))
	if a[0] >= 2400 and a[1] > a[0]:
		b = True
		break
if b:
	print('YES')
else:
	print('NO')


for _ in range(int(input())):
	(_, before, after) = input().split()
	if 2400 <= int(before) < int(after):
		print('YES')
		break
else:
	print('NO')


y = 'NO'
for _ in range(int(input())):
	(a, b) = map(int, input().split()[1:])
	if a > 2399 and b > a:
		y = 'YES'
print(y)


n = int(input())
res = 'NO'
for i in range(n):
	(before, after) = map(int, input().split()[1:])
	if before >= 2400 and after > before:
		res = 'YES'
print(res)


n = int(input())
f = 0
for i in range(n):
	(s, a, b) = input().split()
	a = int(a)
	b = int(b)
	if a >= 2400 and b > a:
		f = 1
print(f * 'YES' + (not f) * 'NO')


n = int(input())
for i in range(n):
	(p, a, b) = input().split()
	if int(a) >= 2400 and int(b) > int(a):
		print('YES')
		break
	elif i == n - 1:
		print('NO')


n = int(input())
output = 'NO'
for _ in range(n):
	(handle, pre, post) = list(input().split())
	pre = int(pre)
	post = int(post)
	if 2400 <= pre < post:
		output = 'YES'
print(output)


n = int(input())
for i in range(n):
	(n, b, a) = input().split()
	B = int(b)
	A = int(a)
	if A - B > 0 and B >= 2400:
		print('YES')
		quit()
print('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())
M = [list(map(str, input().split())) for i in range(n)]
c = 0
for i in range(n):
	if int(M[i][2]) > int(M[i][1]) > 2399:
		print('YES')
		c = 1
		break
if c == 0:
	print('NO')


flag = 0
for _ in range(int(input())):
	(handle, before, after) = map(str, input().split())
	if int(before) >= 2400 and int(after) > int(before):
		flag = 1
		break
if flag == 1:
	print('YES')
else:
	print('NO')


for i in range(int(input())):
	s = 0
	(a, b, c) = input().split()
	if int(b) >= 2400 and int(c) > int(b):
		print('YES')
		s = 1
		break
if s == 0:
	print('NO')


a = int(input())
for i in range(a):
	(c, d) = [int(i) for i in input().split()[1:]]
	if c >= 2400 and d > c:
		print('YES')
		break
else:
	print('NO')


test_cases = int(input())
inp = [input().split(' ') for i in range(test_cases)]
ratings = [(int(i[1]), int(i[2])) for i in inp]
can_handle = [i for i in ratings if i[0] >= 2400 and i[0] < i[1]]
if len(can_handle) >= 1:
	print('YES')
else:
	print('NO')


n = int(input())
L = [str(input()).split(' ') for _ in range(n)]
ok = 0
for i in range(n):
	a = int(L[i][1])
	b = int(L[i][2])
	if b > a and a >= 2400:
		ok = 1
		print('YES')
		break
if ok == 0:
	print('NO')


a = int(input())
e = 0
for i in range(a):
	(b, c, d) = input().split()
	c = int(c)
	d = int(d)
	if c >= 2400 and d - c > 0:
		e += 1
if e > 0:
	print('YES')
else:
	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')
		exit(0)
print('NO')


n = int(input())
l = []
for i in range(n):
	(name, x, y) = input().split()
	(x, y) = (int(x), int(y))
	l.extend([x, y])
for i in range(0, n * 2, 2):
	if l[i] >= 2400 and l[i + 1] > l[i]:
		print('YES')
		break
else:
	print('NO')


n = int(input())
p = False
for _ in range(n):
	(name, p1, p2) = input().split()
	(p1, p2) = (int(p1), int(p2))
	if p1 >= 2400 and p2 > p1:
		p = True
print(['NO', 'YES'][p])


num = int(input())
sol = 0
for i in range(num):
	list = [x for x in input().split(' ')]
	if int(list[1]) >= 2400 and int(list[2]) > int(list[1]):
		sol = 1
if sol == 1:
	print('YES')
else:
	print('NO')


n = int(input())
good = False
for _ in range(n):
	(name, before_s, after_s) = input().split(' ')
	before = int(before_s)
	after = int(after_s)
	if before >= 2400 and after > before:
		good = True
if good:
	print('YES')
else:
	print('NO')


for _ in ' ' * int(input()):
	(a, b) = map(int, input().split()[1:])
	if b > a >= 2400:
		print('YES')
		exit()
print('NO')


n = int(input())
for i in range(n):
	(_, l, h) = input().split()
	(l, h) = (int(l), int(h))
	if l < 2400:
		continue
	if h <= l:
		continue
	print('YES')
	exit(0)
print('NO')


t = int(input())
p = 0
while t > 0:
	(s, a, b) = input().split()
	a = int(a)
	b = int(b)
	if b > a and a >= 2400:
		p = 1
	t -= 1
if p == 1:
	print('YES')
else:
	print('NO')


n = int(input())
answer = 'NO'
for i in range(n):
	x = input().split(' ')
	name = x[0]
	b = int(x[1])
	a = int(x[2])
	if b >= 2400 and a > b:
		answer = 'YES'
		break
print(answer)


n = int(input())
i = 1
while i <= n:
	(s, x, y) = input().split(' ')
	x = int(x)
	y = int(y)
	if x >= 2400 and y > x:
		print('YES')
		exit(0)
	i = i + 1
print('NO')


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


n = int(input())
f = False
for i in range(n):
	(s, a, b) = list(input().split())
	if int(a) >= 2400 and int(b) > int(a):
		print('YES')
		f = True
		break
if not f:
	print('NO')


k = 0
for i in range(int(input())):
	(a, x, y) = input().split()
	if int(x) >= 2400 and int(y) > int(x):
		k = 1
if k == 1:
	print('YES')
else:
	print('NO')


def do_1():
	n = int(input())
	exit = False
	i = 0
	while not exit and i < n:
		(name, before, after) = input().split(' ')
		before = int(before)
		after = int(after)
		if before > 2399:
			if after > before:
				print('YES')
				return
		i = i + 1
	print('NO')
do_1()


def main():
	n = int(input())
	found = False
	for _ in range(n):
		s = input()
		if not found:
			[before, after] = [int(_) for _ in s.split()[1:]]
			if after > before >= 2400:
				found = True
	print('YES' if found else 'NO')
main()


n = input()
flag = False
dict = {}
for i in range(int(n)):
	(name, before, after) = input().split()
	list1 = []
	list1.append(name)
	list1.append(before)
	list1.append(after)
	dict[i] = list1
for i in range(int(n)):
	if int(dict[i][1]) >= 2400 and int(dict[i][2]) > int(dict[i][1]):
		flag = True
		break
if flag:
	print('YES')
else:
	print('NO')


n = int(input())
c = []
flag = 0
for i in range(n):
	c.append(input().split())
for i in range(n):
	if int(c[i][1]) >= 2400 and int(c[i][1]) < int(c[i][2]):
		flag = 1
		break
if flag:
	print('YES')
else:
	print('NO')


n = int(input())
a = [input().split() for i in range(n)]
k = 0
for j in range(n):
	if int(a[j][-2]) >= 2400 and int(a[j][-1]) > int(a[j][-2]):
		k += 1
		break
if k > 0:
	print('YES')
else:
	print('NO')


a = int(input())
ans = False
for i in range(a):
	line = input().split()
	name = line[0]
	num1 = int(line[1])
	num2 = int(line[2])
	if num1 >= 2400:
		if num2 - num1 > 0:
			ans = True
if ans:
	print('YES')
else:
	print('NO')


t = int(input())
d = []
c = 0
for i in range(t):
	s = [i for i in input().split()]
	d.append((int(s[1]), int(s[2])))
for i in d:
	if i[0] >= 2400:
		if i[1] - i[0] > 0:
			c += 1
if c > 0:
	print('YES')
else:
	print('NO')


n = int(input())
d = []
e = []
f = []
m = 0
for i in range(n):
	(a, b, c) = map(str, input().split())
	b = int(b)
	c = int(c)
	d.append(b)
	e.append(c)
for i in d:
	if i >= 2400:
		f.append(d.index(i))
if len(f) == 0:
	print('NO')
else:
	for i in f:
		if e[i] > d[i]:
			m += 1
	if m > 0:
		print('YES')
	else:
		print('NO')


n = int(input())
res = 0
for i in range(n):
	(handle, before, after) = input().split()
	before = int(before)
	after = int(after)
	if after > before and before >= 2400:
		print('YES')
		break
else:
	print('NO')


n = int(input())
answer = 'NO'
for i in range(1, n + 1):
	x = input().split()
	name = x[0]
	before = int(x[1])
	after = int(x[2])
	if before >= 2400 and after > before:
		answer = 'YES'
print(answer)


x = int(input())
p = []
for i in range(x):
	y = [n for n in input().split()]
	p.append(y)
flag = 0
for i in range(x):
	before = int(p[i][1])
	after = int(p[i][2])
	if before >= 2400 and after > before:
		flag = 1
		print('YES')
		break
if flag == 0:
	print('NO')


n = int(input())
ans = False
for _ in range(n):
	(name, s1, s2) = input().split()
	(s1, s2) = (int(s1), int(s2))
	if s1 >= 2400 and s2 > s1:
		ans = True
print('YES' if ans else 'NO')


import sys
n = int(input())
p = [list(input().split()) for _ in range(n)]
for i in range(n):
	if int(p[i][1]) >= 2400 and int(p[i][2]) > int(p[i][1]):
		print('YES')
		sys.exit(0)
print('NO')


nums = int(input())
tr = False
for i in range(nums):
	a = input().split()
	if int(a[1]) >= 2400 and int(a[2]) > int(a[1]):
		tr = True
		break
if tr:
	print('YES')
else:
	print('NO')


c = 0
for u in range(int(input())):
	l = list(map(str, input().split()))
	x = int(l[1])
	y = int(l[2])
	if x >= 2400 and y >= 2400 and (x < y):
		c = c + 1
if c == 0:
	print('NO')
else:
	print('YES')


N = int(input())
for i in range(N):
	inp = input().split()
	be = int(inp[1])
	af = int(inp[2])
	if af > be and be >= 2400:
		print('YES')
		exit()
print('NO')


n = int(input())
flag = False
for i in range(n):
	(s, x, y) = input().split()
	x = int(x)
	y = int(y)
	if x < y and x >= 2400:
		flag = True
if flag == True:
	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())
goon = True
for i in range(n):
	(a, b, c) = map(str, input().split())
	if int(b) >= 2400 and int(c) > int(b):
		goon = False
if goon:
	print('NO')
else:
	print('YES')


for _ in range(int(input())):
	(name, before, after) = input().split()
	if int(before) >= 2400:
		if int(after) > int(before):
			print('YES')
			exit(0)
print('NO')


cnt = 0
for _ in range(int(input())):
	k = input().split()
	a = int(k[1])
	b = int(k[2])
	if a >= 2400 and b > a:
		print('YES')
		cnt = -1
		break
if cnt == 0:
	print('NO')


for i in range(int(input())):
	(_, a, b) = input().split()
	(a, b) = (int(a), int(b))
	if 2400 <= a < b:
		print('YES')
		exit()
print('NO')


def good(n):
	for i in range(n):
		(a, b, c) = (s for s in input().split())
		if int(b) >= 2400 and int(c) > int(b):
			return 'YES'
	return 'NO'
n = int(input())
print(good(n))


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


n = int(input())
c = 0
for i in range(n):
	a = list(map(str, input().split()))
	a[1] = int(a[1])
	a[2] = int(a[2])
	if 2400 <= a[1] < a[2]:
		print('YES')
		c = c + 1
		break
if c == 0:
	print('NO')


val = input()
store = []
flag = 0
for _ in range(0, int(val)):
	str = input()
	store = list(str.split())
	if int(store[1]) >= 2400:
		if int(store[2]) > int(store[1]):
			flag = 1
if flag != 1:
	print('NO')
else:
	print('YES')


def ii():
	return int(input())

def ss():
	return [x for x in input()]

def si():
	return [int(x) for x in input().split()]

def mi():
	return map(int, input().split())
key = True
for _ in range(ii()):
	s = input().split()
	if key and int(s[1]) > 2399 and (int(s[2]) - int(s[1]) > 0):
		key = False
if key:
	print('NO')
else:
	print('YES')


amount = int(input())
found = False
for i in range(amount):
	if not found:
		(name, before, after) = map(str, input().split())
		before = int(before)
		after = int(after)
		if 2400 <= before < after:
			found = True
			break
print('YES' if found else 'NO')


n = int(input())
x = 2400
flag = False
while n > 0:
	n -= 1
	a = [i for i in input().split()]
	if x <= int(a[1]) < int(a[2]):
		flag = True
		break
	else:
		flag = False
if flag == True:
	print('YES')
else:
	print('NO')


q = lambda : map(int, input().split())
qi = lambda : int(input())
qs = lambda : input().split()
(n,) = q()
ans = []
for i in range(n):
	(a, x, y) = qs()
	(x, y) = map(int, (x, y))
	if x >= 2400:
		ans.append(y - x)
ans = [i for i in ans if i > 0]
print('YES' if len(ans) else 'NO')


import math, string, itertools, fractions, heapq, collections, re, array, bisect, sys, random, time, queue, copy
sys.setrecursionlimit(10 ** 7)
inf = 10 ** 20
mod = 10 ** 9 + 7
dd = [(-1, 0), (0, 1), (1, 0), (0, -1)]
ddn = [(-1, 0), (-1, 1), (0, 1), (1, 1), (1, 0), (1, -1), (0, -1), (-1, -1)]

def LI():
	return [int(x) for x in sys.stdin.readline().split()]

def LI_():
	return [int(x) - 1 for x in sys.stdin.readline().split()]

def I():
	return int(sys.stdin.readline())

def LS():
	return sys.stdin.readline().split()

def S():
	return input()

def main():
	n = I()
	f = False
	for _ in range(n):
		(a, b, c) = LS()
		b = int(b)
		c = int(c)
		if 2400 <= b:
			if b < c:
				f = True
	if f:
		return 'YES'
	return 'NO'
print(main())


a = int(input())
for i in range(a):
	(b, c, d) = map(str, input().split())
	x = int(c)
	y = int(d)
	if x >= 2400 and y > x:
		print('YES')
		exit()
print('NO')


a = int(input())
for i in range(a):
	(a, b, c) = input().split()
	if int(b) > 2399 and int(c) > int(b):
		exit(print('YES'))
print('NO')


from sys import *
n = int(input())
for i in range(n):
	s = input().split()
	rev = [int(s[1]), int(s[2]) - int(s[1])]
	if rev[0] >= 2400 and rev[1] > 0:
		print('YES')
		exit(0)
print('NO')


n = int(input())
sb = []
sa = []
for i in range(n):
	(n, s1, s2) = list(input().split())
	if int(s1) >= 2400:
		sb.append(int(s1))
		sa.append(int(s2))
c = 0
for i in range(len(sb)):
	if sb[i] < sa[i]:
		c += 1
if c >= 1:
	print('YES')
else:
	print('NO')


t = int(input())
good = False
li = []
for i in range(t):
	(s, a, b) = input().split()
	a = int(a)
	b = int(b)
	li.append([a, b])
for i in range(len(li)):
	if li[i][0] >= 2400 and li[i][1] > li[i][0]:
		good = True
		break
if good:
	print('YES')
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')
			sys.exit(0)
print('NO')


n = int(input())
c = 0
for i in range(n):
	member = input().split(' ')
	member[1] = int(member[1])
	member[2] = int(member[2])
	if member[1] >= 2400 and member[2] > member[1]:
		c += 1
	member.clear()
if c > 0:
	print('YES')
else:
	print('NO')


import sys

def main():
	inp = sys.stdin.read().strip().split('\n')
	out = []
	for s in inp[1:]:
		(x, y) = map(int, s.split()[1:])
		if x > 2399 and y - x > 0:
			return 'YES'
	return 'NO'
print(main())


n = int(input())
f = True
while n and f:
	S = input()
	S = S.split()
	x = int(S[1])
	y = int(S[2])
	if x >= 2400 and y - x > 0:
		print('YES')
		f = False
	n -= 1
if f:
	print('NO')


n = int(input())
sum = -1
for i in range(n):
	a = [s for s in input().split()]
	if int(a[1]) >= 2400 and int(a[2]) - int(a[1]) > 0:
		sum = 0
		break
if sum < 0:
	print('NO')
else:
	print('YES')


n = int(input())
f = 0
for i in range(1, n + 1):
	s = input()
	s1 = s.split()
	if int(s1[1]) >= 2400:
		if int(s1[1]) < int(s1[2]):
			f = 1
if f == 1:
	print('YES')
else:
	print('NO')


n = int(input())
count = 0
for i in range(n):
	(name, rat_old, rat_new) = input().split()
	if int(rat_new) - int(rat_old) > 0 and int(rat_old) >= 2400:
		count += 1
if count > 0:
	print('YES')
else:
	print('NO')


n = int(input())
m = -1
f = ''
for i in range(n):
	(f, b, c) = input().split()
	b = int(b)
	c = int(c)
	if b >= 2400 and c > b:
		m += 100
if m == -1:
	print('NO')
else:
	print('YES')


def insertion_sort(l):
	for i in range(len(l)):
		for j in range(i):
			k = i - j
			if l[k] >= l[k - 1]:
				(l[k - 1], l[k]) = (l[k], l[k - 1])
			else:
				break
	return l

def selection_sort(l):
	for i in range(len(l)):
		min_ind = i
		min_val = l[i]
		for j in range(i, len(l)):
			if min_val > l[j]:
				min_val = l[j]
				min_ind = j
		(l[i], l[min_ind]) = (l[min_ind], l[i])
	return l

def bubble_sort(l):
	for i in range(len(l) - 1):
		for j in range(len(l) - 1 - i):
			if l[j] > l[j + 1]:
				(l[j], l[j + 1]) = (l[j + 1], l[j])
	return l

def is_even_list(l):
	for i in l:
		if i % 2:
			return False
	return True

def main_function():
	t = int(input())
	output_list = []
	for i in range(t):
		(n, b, a) = [i for i in input().split(' ')]
		if int(a) - int(b) > 0 and int(b) >= 2400:
			return 'YES'
	return 'NO'
print(main_function())


n = int(input())
for _ in range(n):
	(n, rb, ra) = input().split()
	if int(rb) >= 2400 and int(ra) > int(rb):
		print('YES')
		exit()
print('NO')


n = int(input())
flag = 0
for _ in range(n):
	inp = list(input().split())
	if int(inp[2]) > int(inp[1]) and int(inp[1]) >= 2400:
		flag = 1
		break
print('YES' if flag == 1 else 'NO')


n = int(input())
p = 0
while n > 0:
	n -= 1
	x = input()
	a = x.split()
	flag = 0
	a1 = int(a[1])
	a2 = int(a[2])
	if a1 >= 2400 and a2 > a1:
		flag = 1
	if flag == 1:
		p = 1
if p == 1:
	print('YES')
else:
	print('NO')


N = int(input())
mensaje = 'NO'
for i in range(N):
	n = input().split()
	a = int(n[1])
	p = int(n[2])
	if a >= 2400 and p > a:
		mensaje = 'YES'
print(mensaje)


n = int(input())
l = []
for i in range(n):
	l.append(list(map(str, input().split())))
s = 0
for i in range(n):
	if int(l[i][1]) >= 2400:
		if int(l[i][2]) > int(l[i][1]):
			s = 1
			break
if s == 1:
	print('YES')
else:
	print('NO')


n = int(input())
L = []
for k in range(n):
	s = input().split()
	L.append((s[0], s[1], s[2]))
res = 'NO'
for k in L:
	if int(k[1]) >= 2400 and int(k[2]) > int(k[1]):
		res = 'YES'
		break
print(res)


import math
from operator import itemgetter

def get_primes(prime_supr):
	is_prime = [0] * 2 + [1] * prime_supr
	for i in range(2, int(math.sqrt(prime_supr)) + 1):
		if is_prime[i]:
			for j in range(i * i, prime_supr + 1, i):
				is_prime[j] = 0
	return is_prime
get_int = lambda : map(int, input().split())
n = int(input())
for i in range(n):
	(a, b, c) = input().split()
	if int(b) >= 2400 and int(c) - int(b) > 0:
		print('YES')
		exit()
print('NO')


def cj():
	n = int(input())
	for i in range(n):
		(_n, _b, _a) = input().split()
		_b = int(_b)
		_a = int(_a)
		if _b >= 2400 and _b < _a:
			return 'YES'
	return 'NO'
print(cj())


n = int(input())
checker = False
for _ in range(n):
	(x, y, z) = input().split()
	(y, z) = map(int, (y, z))
	if checker == False and y >= 2400 and (z > y):
		checker = True
if checker:
	print('YES')
else:
	print('NO')


n = int(input())
f = 0
for i in range(n):
	l = list(map(str, input().split()))
	a = int(l[1])
	b = int(l[2])
	if a >= 2400 and b > a:
		f = 1
		break
if f == 1:
	print('YES')
else:
	print('NO')


a = int(input())
for i in range(a):
	(l, k, j) = map(str, input().split())
	(k, j) = (int(k), int(j))
	if k >= 2400 and j > k:
		print('YES')
		exit()
print('NO')


n = int(input())
for i in range(n):
	(a, b, c) = map(str, input().split())
	if int(b) >= 2400 and int(c) > int(b):
		print('YES')
		break
	if i == n - 1:
		print('NO')


count = int(input())
exist = False
for i in range(count):
	item = input().split()
	if int(item[2]) > int(item[1]) >= 2400:
		exist = True
		break
if exist:
	print('YES')
else:
	print('NO')


n = int(input())
result = 'NO'
for i in range(n):
	line = input()
	data = line.split()
	before = int(data[1])
	after = int(data[2])
	if before >= 2400 and after > before:
		result = 'YES'
		break
print(result)


n = int(input())
c = [map(int, input().split()[1:]) for _ in range(n)]
print('YES' if any([b > a >= 2400 for (a, b) in c]) else 'NO')


def solve(n):
	for item in range(n):
		(n, b, a) = input().split()
		if int(b) >= 2400 and int(a) > int(b):
			return 'YES'
	return 'NO'
n = int(input())
print(solve(n))


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


n = int(input())
status = False
for i in range(n):
	x = input().split()
	if int(x[1]) >= 2400 and int(x[2]) > int(x[1]):
		status = True
if status:
	print('YES')
else:
	print('NO')


n = int(input())
for _ in range(n):
	(a, b, c) = input().split()
	(b, c) = map(int, [b, c])
	if b >= 2400 and c > b:
		print('YES')
		exit()
print('NO')


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


a = int(input())
b = []
d = 0
for x in range(a):
	b.append(input().split())
	if int(b[x][1]) >= 2400 and int(b[x][2]) > int(b[x][1]):
		print('YES')
		d = 1
		break
if d == 0:
	print('NO')


n = int(input())
f = 0
for i in range(n):
	l = list(input().split())
	if 2400 <= int(l[1]) and int(l[1]) < int(l[2]):
		print('YES')
		f = 1
		break
if f == 0:
	print('NO')


from math import *
from cmath import *
from itertools import *
from decimal import *
from fractions import *
from sys import *
from types import CodeType, new_class
n = int(input())
for x in range(n):
	a = input().split()
	if int(a[1]) >= 2400 and int(a[1]) < int(a[2]):
		print('YES')
		exit()
print('NO')


n = int(input())
check = False
for i in range(0, n):
	inputs = input().split()
	if int(inputs[1]) >= 2400 and int(inputs[2]) > int(inputs[1]):
		check = True
		break
if check:
	print('YES')
else:
	print('NO')


n = int(input())
fl = 0
for _ in range(n):
	(a, b, c) = input().split()
	b = int(b)
	c = int(c)
	if b < c:
		if b >= 2400 and c > 2400:
			fl = 1
			break
if fl == 1:
	print('YES')
else:
	print('NO')


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')


T = int(input())
flag = False
for i in range(T):
	stu = input().split()
	if int(stu[1]) >= 2400 and int(stu[2]) > int(stu[1]):
		flag = True
if flag:
	print('YES\n')
else:
	print('NO\n')


ans = False
for _ in range(int(input())):
	alpha = input().split()
	alpha[1] = int(alpha[1])
	alpha[2] = int(alpha[2])
	if 2400 <= alpha[1] < alpha[2]:
		ans = True
if ans:
	print('YES')
else:
	print('NO')


s = 0
lst = []
z = int(input())
for x in range(z):
	c = list(input().split())
	c[1] = int(c[1])
	c[2] = int(c[2])
	if 2400 <= c[1] and c[1] < c[2]:
		s += 1
if s > 0:
	print('YES')
else:
	print('NO')


n = int(input())
count = 0
for i in range(n):
	l1 = list(input().split())
	before = int(l1[1])
	after = int(l1[2])
	if before >= 2400 and after > before:
		count = 1
		break
if count == 1:
	print('YES')
else:
	print('NO')


n = int(input())
ok = 0
for i in range(n):
	(a, b, c) = list(map(str, input().split()))
	if int(c) > int(b) and int(b) >= 2400:
		ok = 1
if ok:
	print('YES')
else:
	print('NO')


n = int(input())
arr = []
for _ in range(n):
	(name, bef, dop) = list(map(str, input().split()))
	arr.append([int(bef), int(dop)])
for x in arr:
	if x[1] > x[0] >= 2400:
		print('YES')
		break
else:
	print('NO')


n = int(input())
z = 'NO'
for i in range(n):
	(s, b, a) = map(str, input().split())
	(a, b) = (int(a), int(b))
	if b >= 2400 and a > b:
		z = 'YES'
print(z)


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())
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):
	(s, i) = (input(), 0)
	while s[i] != ' ':
		i += 1
	j = i
	i += 1
	while s[i] != ' ':
		i += 1
	a = int(s[j + 1:i])
	b = int(s[i + 1:len(s)])
	if a >= 2400 and b > a:
		print('YES')
		exit()
print('NO')


n = int(input())
names = []
old = []
new = []
for i in range(n):
	(x, y, z) = [i for i in input().split(' ')]
	names.append(x)
	old.append(int(y))
	new.append(int(z))
won = 0
for i in range(n):
	if old[i] >= 2400 and new[i] > old[i]:
		won = 1
if won:
	print('YES')
else:
	print('NO')


n = int(input())
l = []
count = 0
for i in range(n):
	w = list(map(str, input().split()))
	l.append(w)
for i in range(n):
	x = int(l[i][2]) - int(l[i][1])
	if x > 0 and int(l[i][2]) > 2400 and (int(l[i][1]) >= 2400):
		count += 1
if count >= 1:
	print('YES')
else:
	print('NO')


b = False
for p in range(0, int(input())):
	(q, w, e) = input().split()
	(w, e) = (int(w), int(e))
	if (w >= 2400) & (e - w > 0):
		b = True
print('YES' if b else 'NO')


n = int(input())
flag = 0
for i in range(n):
	s = list(map(str, input().split()))
	if int(s[1]) >= 2400 and int(s[2]) > int(s[1]):
		flag = 1
if flag == 1:
	print('YES')
else:
	print('NO')


k = 0
x = int(input())
for i in range(x):
	a = input().split()
	a[1] = int(a[1])
	a[2] = int(a[2])
	if a[1] >= 2400 and a[2] > a[1]:
		print('YES')
		k = 1
		break
	else:
		continue
if i == x - 1 and k == 0:
	print('NO')


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


n = int(input())
for i in range(n):
	(name, b_score, a_score) = input().split()
	if int(b_score) >= 2400 and int(a_score) > int(b_score):
		print('YES')
		break
else:
	print('NO')


n = int(input())
ans = 'NO'
for _ in range(n):
	a = input().split()
	if int(a[1]) >= 2400 and int(a[2]) > int(a[1]):
		ans = 'YES'
print(ans)


n = int(input())
s = 0
for x in range(n):
	(k, m, l) = input().split()
	if int(m) >= 2400 and int(l) > int(m):
		s = 1
	else:
		pass
if s == 1:
	print('YES')
else:
	print('NO')


def ans(b, c):
	x = int(b)
	y = int(c)
	if x >= 2400 and y > x:
		return True
	return False
t = int(input())
f = 0
while t > 0:
	(a, b, c) = map(str, input().split())
	if ans(b, c) == True:
		f = 1
		break
	t -= 1
if f:
	print('YES')
else:
	print('NO')


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


for i in range(int(input())):
	(name, b, a) = input().split()
	if int(a) > int(b) > 2399:
		print('YES')
		exit()
print('NO')


nb_test = int(input())
ans = 'NO'
for _ in range(nb_test):
	(name, *vals) = input().split()
	(x, y) = map(int, vals)
	if y > x >= 2400:
		ans = 'YES'
		break
print(ans)


y = 0
for i in range(int(input())):
	x = list(map(str, input().split()))
	if int(x[1]) >= 2400:
		if int(x[2]) > int(x[1]):
			y += 1
if y > 0:
	print('YES')
else:
	print('NO')


num = int(input())
ans = 0
for i in range(num):
	string = input().split()
	if int(string[1]) >= 2400:
		if int(string[1]) < int(string[2]):
			ans = 1
if ans == 1:
	print('YES')
else:
	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())
contestants = []
for _ in range(n):
	contestants.append([i for i in input().split()])

def check():
	for k in contestants:
		if int(k[2]) > int(k[1]) >= 2400:
			return 'YES'
	return 'NO'
print(check())


n = int(input())
for _ in range(n):
	(name, r, n) = input().split()
	r = int(r)
	n = int(n)
	if r >= 2400 and n > r:
		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')


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


n = int(input())
ans = 'NO'
for i in range(n):
	s = input().split()
	s.pop(0)
	s = [int(i) for i in s]
	if s[1] > s[0] and s[0] >= 2400:
		ans = 'YES'
print(ans)


def contest(arr):
	for i in arr:
		if i[0] >= 2400:
			if i[1] > i[0]:
				return 'YES'
	return 'NO'
n = int(input())
ar = []
for i in range(n):
	x = input().split()
	tmp = [int(x[1]), int(x[2])]
	ar.append(tmp)
print(contest(ar))


x = int(input())
c = 0
for i in range(x):
	s = list(map(str, input().split()))
	if int(s[1]) >= 2400:
		if int(s[2]) > int(s[1]):
			c = 1
		else:
			c = 0
	if c == 1:
		break
if c == 1:
	print('YES')
else:
	print('NO')


n = int(input())
result = 'NO'
for i in range(n):
	m = input().split(' ')
	if int(m[1]) >= 2400 and int(m[2]) > int(m[1]):
		result = 'YES'
print(result)


n = int(input())
a = [[j for j in input().split()] for i in range(n)]
flag = 1
for row in a:
	if int(row[1]) >= 2400:
		if int(row[2]) - abs(int(row[1])) > 0:
			print('YES')
			flag = 0
			break
if flag:
	print('NO')


flag = 'NO'
for _ in range(int(input())):
	l = input().split()
	if int(l[1]) >= 2400 and int(l[2]) > int(l[1]):
		flag = 'YES'
print(flag)


import sys
n = int(input())
ans = 'NO'
for i in range(n):
	(handle, before, after) = sys.stdin.readline().split()
	if int(before) >= 2400 and int(after) > int(before):
		ans = 'YES'
print(ans)


n = int(input())
ans = False
for i in range(n):
	t = list(input().split())
	if 2400 <= int(t[1]) < int(t[2]):
		ans = True
if ans:
	print('YES')
else:
	print('NO')


import sys
n = int(input())
l = []
for i in range(n):
	l.append(input().split())
for i in range(n):
	if int(l[i][1]) >= 2400 and int(l[i][2]) > int(l[i][1]):
		print('YES')
		sys.exit()
print('NO')


import sys
n = int(input())
for _ in range(n):
	(a, b, c) = list(sys.stdin.readline().split())
	bn = int(b)
	cn = int(c)
	if bn >= 2400 and cn > bn:
		print('YES')
		break
else:
	print('NO')


n = int(input())
for i in range(n):
	[name, a, b] = list(map(str, input().split()))
	a = int(a)
	b = int(b)
	if a >= 2400 and b > a:
		print('YES')
		exit(0)
print('NO')


n = int(input())
for i in range(n):
	(s, x, y) = input().split()
	if int(y) > int(x) and int(x) >= 2400:
		print('YES')
		exit()
print('NO')


n = int(input())
k = 0
for i in range(n):
	name = [i for i in input().split()]
	if int(name[1]) >= 2400 and int(name[2]) - int(name[1]) > 0:
		k += 1
if k == 0:
	print('NO')
else:
	print('YES')


c = 0
for i in range(int(input())):
	(s, r1, r2) = input().split()
	r1 = int(r1)
	r2 = int(r2)
	if r1 >= 2400 and r2 > r1:
		c += 1
if c != 0:
	print('YES')
else:
	print('NO')


a = int(input())
g = 0
for i in range(a):
	(n, b, d) = [i for i in input().split()]
	if int(b) >= 2400 and int(d) - int(b) >= 1:
		g += 1
if g > 0:
	print('YES')
else:
	print('NO')


for i in range(int(input())):
	l = list(map(str, input().split()))
	if int(l[2]) > int(l[1]) > 2399:
		print('YES')
		exit(0)
print('NO')


for i in range(int(input())):
	x = input().split()
	if int(x[1]) >= 2400 and int(x[1]) < int(x[2]):
		print('YES')
		exit()
print('NO')


n = int(input())
output = 'NO'
for i in range(0, n):
	contest = input().split(' ')
	if int(contest[1]) >= 2400 and int(contest[1]) < int(contest[2]):
		output = 'YES'
print(output)


u = 0
for j in range(int(input())):
	(a, b, c) = list(input().split())
	if int(b) >= 2400:
		if int(c) > int(b):
			u += 1
if u > 0:
	print('YES')
else:
	print('NO')


n = int(input())
output = 'NO'
for i in range(n):
	(name, b, c) = input().split()
	if int(c) > int(b) > 2399:
		output = 'YES'
print(output)


n = input()
b = 0
for i in range(0, int(n)):
	(x, y, z) = input().split()
	if int(y) >= 2400 and int(z) > int(y):
		b = 1
if b == 1:
	print('YES')
else:
	print('NO')


from sys import stdin

def parse():
	line = stdin.readline().strip()
	N = int(line)
	for x in range(N):
		line = stdin.readline().split()
		(n1, n2) = (int(line[1]), int(line[2]))
		if n1 >= 2400 and n2 > n1:
			print('YES')
			return
	print('NO')
parse()


c = 0
for i in range(int(input())):
	s = input()
	a = s.split(' ')
	if int(a[1]) >= 2400:
		if int(a[2]) > int(a[1]):
			c = 1
			break
if c == 0:
	print('NO')
else:
	print('YES')


n = int(input())
c = ''
d = ''
for i in range(n):
	(s, a, b) = map(str, input().split())
	(a, b) = (int(a), int(b))
	if a >= 2400 and b > a:
		c = 'YES'
		d = 'YES'
	else:
		c = 'NO'
if d == 'YES':
	print('YES')
else:
	print('NO')


the_useful_list = []
nb_users = input()
nb_users = int(nb_users)
for i in range(nb_users):
	x = input().split()
	test = list(x)
	if int(test[1]) < int(test[2]) and int(test[1]) >= 2400:
		print('YES')
		quit()
print('NO')


n = int(input())
q = 0
for i in range(n):
	a = input()
	b = a.split(' ')
	m = int(b[1])
	p = int(b[2])
	if m >= 2400 and p > m:
		q = 1
if q:
	print('YES')
else:
	print('NO')


n = int(input())
good = False
for _ in range(n):
	(name, b, a) = input().split()
	if int(b) >= 2400 and int(a) > int(b):
		good = True
if good:
	print('YES')
else:
	print('NO')


n = int(input())
a = []
flag = False
for _ in range(n):
	s = [str(s) for s in input().split()]
	s[1] = int(s[1])
	s[2] = int(s[2])
	a.append(s)
for i in range(n):
	if a[i][1] >= 2400 and a[i][2] - a[i][1] >= 1:
		flag = True
		break
print('YES') if flag == True else print('NO')


n = int(input())
k = []
z = 0
for i in range(n):
	k += input().split()
for i in range(1, len(k)):
	if i % 3 != 0:
		if int(k[i]) >= 2400:
			z += 1
			if z == 2 and k[i - 1] < k[i]:
				print('YES')
				break
		else:
			z = 0
	else:
		z = 0
else:
	print('NO')


t = int(input())
for i in range(t):
	(a, b, c) = input().split()
	if int(b) >= 2400 and int(c) > int(b):
		print('YES')
		break
	elif i == t - 1:
		print('NO')


n = int(input())
flag = 0
for i in range(n):
	ls = input().split()
	(ls[1], ls[2]) = (int(ls[1]), int(ls[2]))
	if ls[1] >= 2400 and ls[2] > ls[1]:
		flag = 1
if flag == 1:
	print('YES')
else:
	print('NO')


n = int(input())
contestants = []
for _ in range(n):
	contestants.append([i for i in input().split()])
for k in contestants:
	if int(k[2]) > int(k[1]) >= 2400:
		print('YES')
		break
else:
	print('NO')


k = int(0)
for _ in range(int(input())):
	a = list(input().split(' '))
	if int(a[1]) >= 2400 and int(a[2]) > int(a[1]):
		k = k + 1
if k == 0:
	print('NO')
else:
	print('YES')


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


x = int(input())
flag = False
for i in range(x):
	q = input().split()
	q[1] = int(q[1])
	q[2] = int(q[2])
	if q[1] >= 2400 and q[2] - q[1] > 0:
		flag = True
if flag:
	print('YES')
else:
	print('NO')


t = int(input())
count = 0
for i in range(t):
	(name, before, after) = map(str, input().split())
	if int(before) >= 2400:
		if int(after) > int(before):
			count = 1
if count == 1:
	print('YES')
else:
	print('NO')


import re
from sys import stderr
from typing import Union, Generator, List, Tuple
import string
INF = 2e+18 + 3
EPS = 1e-10

def main():
	n = int(input())
	did_outrun = False
	for _ in range(n):
		(before, after) = map(int, input().split()[1:])
		if 2400 <= before < after:
			did_outrun = True
			break
	print('YES' if did_outrun else 'NO')
main()


def f():
	x = int(input())
	success = False
	for _ in range(x):
		li = list(map(str, input().split()))
		li[1] = int(li[1])
		li[2] = int(li[2])
		if int(li[1]) >= 2400 and int(li[2]) > li[1]:
			success = True
	print('YES' if success == True else 'NO')
f()


import os
import sys
from io import BytesIO, IOBase
import math
from decimal import Decimal
from decimal import *
from collections import defaultdict, deque
import heapq
from decimal import Decimal
getcontext().prec = 25
abcd = 'abcdefghijklmnopqrstuvwxyz'
MOD = 1000000007
BUFSIZE = 8192
from bisect import bisect_left, bisect_right

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')
a = int(input())
ans = 'NO'
for i in range(a):
	l = list(input().split(' '))
	if int(l[2]) > int(l[1]) and int(l[1]) >= 2400:
		ans = 'YES'
print(ans)


n = int(input())
ans = False
for _ in range(n):
	(name, bef, aft) = input().split()
	bef = int(bef)
	aft = int(aft)
	if bef >= 2400 and bef < aft:
		ans = True
print('YES' if ans else 'NO')


def answer(handles):
	for handle in handles:
		if handle.before >= 2400:
			if handle.after > handle.before:
				print('YES')
				return 1
	print('NO')
	return 0

class handle:

	def __init__(self, name, before, after):
		self.name = name
		self.before = before
		self.after = after
n = int(input())
handles = []
for i in range(0, n):
	string = input().split()
	name = string[0]
	before = int(string[1])
	after = int(string[2])
	handles.append(handle(name, before, after))
answer(handles)


import sys
import math
get_string = lambda : sys.stdin.readline().strip()
get_int_list = lambda : list(map(int, sys.stdin.readline().strip().split()))
get_intList_from_str = lambda : list(map(int, list(sys.stdin.readline().strip())))
get_charList_from_str = lambda : list(sys.stdin.readline().strip())
get_char_list = lambda : sys.stdin.readline().strip().split()
get_int = lambda : int(sys.stdin.readline().strip())
pt = lambda x: sys.stdout.write(str(x))
n = get_int()
flag = True
coders = [get_char_list() for _ in range(n)]
for i in range(n):
	coders[i] = [int(coders[i][1]), int(coders[i][2])]
	if coders[i][0] >= 2400 and coders[i][1] - coders[i][0] > 0:
		print('YES')
		flag = False
		break
if flag:
	print('NO')


def good_contest(l):
	good = 'NO'
	for i in range(len(l)):
		if l[i][2] > l[i][1] and l[i][1] >= 2400:
			good = 'YES'
			break
	return good
n = int(input().strip())
l = list()
for i in range(n):
	l.append(list(input().strip().split()))
	(l[i][1], l[i][2]) = (int(l[i][1]), int(l[i][2]))
print(good_contest(l))


n = int(input())
r = lambda : list(input().split())
c = lambda l: int(l[1]) >= 2400 and int(l[2]) > int(l[1])
print(('NO', 'YES')[any((c(r()) for _ in range(n)))])


n = int(input())
i = 0
k = 0
while i < n:
	i = i + 1
	A = input().split()
	if int(A[1]) >= 2400 and int(A[1]) < int(A[2]):
		k = 1
		break
if k == 1:
	print('YES')
else:
	print('NO')


t = int(input())
good = False
for i in range(t):
	(name, before, after) = input().split()
	before = int(before)
	after = int(after)
	if before >= 2400 and after > before:
		good = True
		break
if good:
	print('YES')
else:
	print('NO')


t = int(input())
d = 0
for i in range(t):
	(a, b, c) = input().split()
	x = int(b)
	y = int(c)
	if x >= 2400 and y - x > 0:
		d += 1
if d >= 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')


t = int(input())
f = 0
for i in range(t):
	(s, a, b) = input().split()
	(a, b) = (int(a), int(b))
	if a >= 2400 and b > a:
		f = 1
if f == 1:
	print('YES')
else:
	print('NO')


from sys import exit
n = int(input())
for _ in range(n):
	(s, a, b) = input().split()
	a = int(a)
	b = int(b)
	if a >= 2400 and a < b:
		print('YES')
		exit(0)
print('NO')


t = int(input())
for i in range(t):
	(a, b, c) = map(str, input().split())
	b = int(b)
	c = int(c)
	if b >= 2400 and c > b:
		print('YES')
		exit()
print('NO')


a = int(input())
y = 0
for i in range(a):
	b = list(map(str, input().split()))
	c = int(b[2])
	d = int(b[1])
	if c > d and d >= 2400:
		y = 1
		break
if y == 1:
	print('YES')
else:
	print('NO')


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')
		exit()
print('NO')


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


n = int(input())
b = False
for _ in range(n):
	(before, after) = map(int, input().split()[1:])
	if after > before >= 2400:
		b = True
		break
print('YES' if b else 'NO')


n = int(input())

def f(n):
	for i in range(n):
		(s, bf, af) = input().split()
		(bf, af) = (int(bf), int(af))
		if bf >= 2400 and af - bf > 0:
			return 'YES'
	return 'NO'
print(f(n))


n = int(input())
ans = False
for i in range(n):
	(a, b, c) = map(str, input().split())
	bb = int(b)
	cc = int(c)
	if bb >= 2400 and cc > bb:
		ans = True
if ans:
	print('YES')
else:
	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')


partipants = int(input())
for i in range(partipants):
	player = input().split()
	if int(player[2]) > int(player[1]) >= 2400:
		print('YES')
		exit()
print('NO')


info = int(input())
data = []
for i in range(info):
	data.append([info for info in input().split(' ')])
flag = 'NO'
for i in data:
	if int(i[1]) < int(i[2]) and int(i[1]) >= 2400:
		flag = 'YES'
print(flag)


T = int(input())
sukses = 0
for i in range(T):
	(nama, before, after) = map(str, input().split())
	(before, after) = (int(before), int(after))
	if before >= 2400 and after > before:
		sukses += 1
if sukses > 0:
	print('YES')
else:
	print('NO')


n = int(input())
for i in range(n):
	x = list(map(str, input().split()))
	if int(x[2]) > int(x[1]) >= 2400:
		print('YES')
		break
	elif not int(x[2]) > int(x[1]) > 2400 and i == n - 1:
		print('NO')


N = int(input())
X = N
(L, R) = ([], [])
while X:
	(A, B, C) = map(str, input().split())
	L.append(int(B))
	R.append(int(C))
	X -= 1
FLAG = 0
for i in range(N):
	if L[i] >= 2400 and R[i] > L[i]:
		FLAG = 1
		print('YES')
		break
if FLAG == 0:
	print('NO')


a = 0
t = int(input())
for i in range(t):
	l = list(input().split())
	if int(l[1]) >= 2400 and int(l[1]) < int(l[2]):
		print('YES')
		a = 1
		break
if a == 0:
	print('NO')


t = int(input())
temp = 0
while t != 0:
	s = input().split()
	x = int(s[1])
	y = int(s[2])
	if x >= 2400:
		if y > x:
			temp = 1
	t = t - 1
if temp != 1:
	print('NO')
else:
	print('YES')


f = lambda : map(int, input().split())
n = int(input())
c = 0
while n:
	(s, *l) = input().split()
	if int(l[0]) >= 2400 and int(l[1]) > int(l[0]):
		c += 1
	n -= 1
print('YNEOS'[c == 0::2])


n = int(input())
f = 0
for i in range(n):
	(a, b, c) = input().split()
	if int(c) > int(b) > 2399:
		f = 1
if f == 1:
	print('YES')
else:
	print('NO')


n = int(input())
for _ in range(n):
	(handle, prev, curr) = input().split()
	prev = int(prev)
	curr = int(curr)
	if prev < 2400:
		continue
	if curr > prev:
		print('YES')
		break
else:
	print('NO')


n = int(input())
p = []
for i in range(n):
	l = input().split()
	p.append(l)
flag = 0
for j in range(len(p)):
	if int(p[j][1]) >= 2400 and int(p[j][2]) > 2400 and (int(p[j][2]) > int(p[j][1])):
		flag = 1
		print('YES')
		break
if flag == 0:
	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())
lst = []
count = 0
for i in range(n):
	lst2 = list(map(str, input().split()))
	lst.append(lst2)
for i in range(len(lst)):
	if int(lst[i][1]) >= 2400 and int(lst[i][2]) > int(lst[i][1]):
		count += 1
		break
print('YES' if count == 1 else 'NO')


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


import sys, bisect
from sys import stdin, stdout
from bisect import bisect_left, bisect_right, bisect, insort, insort_left, insort_right
from math import gcd, ceil, floor, sqrt
from collections import Counter, defaultdict, deque, OrderedDict
from queue import Queue, PriorityQueue
from string import ascii_lowercase
from heapq import *
from itertools import islice
sys.setrecursionlimit(10 ** 6)
INF = float('inf')
MOD = 998244353
mod = 10 ** 9 + 7

def isPrime(n):
	if n <= 1:
		return False
	if n <= 3:
		return True
	if n % 2 == 0 or n % 3 == 0:
		return False
	for i in range(5, ceil(sqrt(n)) + 1, 6):
		if n % i == 0 or n % (i + 2) == 0:
			return False
	return True

def st():
	return list(stdin.readline().strip())

def inp():
	return int(stdin.readline())

def li():
	return list(map(int, stdin.readline().split()))

def mp():
	return map(int, stdin.readline().split())

def pr(n):
	stdout.write(str(n) + '\n')

def DFS(dictionary, vertex, visited):
	visited[vertex] = True
	stack = [vertex]
	print(vertex)
	while stack:
		a = stack.pop()
		for i in dictionary[a]:
			if not visited[i]:
				print(i)
				visited[i] = True
				stack.append(i)

def BFS(dictionary, vertex, visited):
	visited[vertex] = True
	q = deque()
	q.append(vertex)
	while q:
		a = q.popleft()
		for i in dictionary[a]:
			if not visited[i]:
				visited[i] = True
				q.append(i)
				print(i)

def soe(limit):
	l = [1] * (limit + 1)
	l[0] = 0
	l[1] = 0
	prime = []
	for i in range(2, limit + 1):
		if l[i]:
			for j in range(i * i, limit + 1, i):
				l[j] = 0
	for i in range(2, limit + 1):
		if l[i]:
			prime.append(i)
	return prime

def segsoe(low, high):
	limit = int(high ** 0.5) + 1
	prime = soe(limit)
	n = high - low + 1
	l = [0] * (n + 1)
	for i in range(len(prime)):
		lowlimit = low // prime[i] * prime[i]
		if lowlimit < low:
			lowlimit += prime[i]
		if lowlimit == prime[i]:
			lowlimit += prime[i]
		for j in range(lowlimit, high + 1, prime[i]):
			l[j - low] = 1
	for i in range(low, high + 1):
		if not l[i - low]:
			if i != 1:
				print(i)

def gcd(a, b):
	while b:
		a = a % b
		(b, a) = (a, b)
	return a

def power(a, n):
	r = 1
	while n:
		if n & 1:
			r = r * a
		a *= a
		n = n >> 1
	return r

def don(d, ans, vi, i):
	vi[i] = True
	stack = [i]
	while stack:
		a = stack.pop()
		for x in d[a]:
			if not vi[x]:
				ans[i] += 1
				vi[x] = True
				stack.append(x)

def solve():
	n = inp()
	c = 0
	for i in range(n):
		s = input().split()
		(a, b) = (int(s[1]), int(s[2]))
		if a >= 2400 and b > a:
			c = 1
	if c:
		pr('YES')
	else:
		pr('NO')
for _ in range(1):
	solve()


def elegible(bp, ap):
	if bp >= 2400:
		if ap > bp:
			return True
	else:
		return False
num_users = input()
flag = 'NO'
for i in range(0, int(num_users)):
	(user, bp, ap) = input().split()
	if elegible(int(bp), int(ap)):
		flag = 'YES'
		break
print(flag)


bl = False
for _ in range(int(input())):
	ls = list(input().split())
	bl = True if int(ls[1]) >= 2400 and int(ls[2]) > int(ls[1]) else bl
print('YES' if bl else 'NO')


import math
import collections
import bisect
import heapq
import time
import random
import itertools
import sys
N = int(input())
for i in range(N):
	(a, b, c) = input().split()
	(b, c) = (int(b), int(c))
	if b >= 2400 and c > b:
		print('YES')
		exit(0)
print('NO')


n = int(input())
yes = False
for _ in range(n):
	(a, b) = map(int, input().split(' ')[1:])
	if 2400 <= a and a < b:
		yes = True
		break
if yes:
	print('YES')
else:
	print('NO')


n = int(input())
for i in range(n):
	l = list(input().split())
	if int(l[1]) >= 2400 and int(l[2]) > int(l[1]):
		c = 'YES'
		break
	else:
		c = 'NO'
print(c)


f = 'NO'
for _ in range(int(input())):
	(_, b, c) = input().split()
	if int(c) > int(b) > 2399:
		f = 'YES'
print(f)


n = int(input())
for i in range(n):
	k = input().split()
	l = int(k[1])
	f = int(k[2])
	if l < f and l >= 2400:
		print('YES')
		break
else:
	print('NO')


n = int(input())
ans = False
for i in range(0, n):
	(a, b, c) = input().split()
	b = int(b)
	c = int(c)
	if b >= 2400 and c > b:
		ans = True
if ans:
	print('YES')
else:
	print('NO')


__author__ = 'Dilshod'
n = int(input())
for i in range(n):
	s = input()
	s = s.split()
	a = int(s[1])
	b = int(s[-1])
	if a >= 2400 and b > a:
		print('YES')
		exit()
print('NO')


n = int(input())
outscored = 0
for _ in range(n):
	s = list(input().split())
	(a, b) = (int(s[1]), int(s[2]))
	if a < b and a >= 2400:
		outscored = 1
print('YES' if outscored else 'NO')


n = int(input())
k = 0
for i in range(n):
	(p, r1, r2) = input().split()
	if int(r1) >= 2400 and int(r2) > int(r1):
		k += 1
		break
if k > 0:
	print('YES')
else:
	print('NO')


n = int(input())
found = False
for i in range(n):
	line = input().split()
	name = line[0]
	before = int(line[1])
	after = int(line[2])
	if before >= 2400 and after > before:
		found = True
if found:
	print('YES')
else:
	print('NO')


n = int(input())
t = False
while n and (not t):
	(x, y, z) = input().split()
	if int(y) >= 2400 and int(y) < int(z):
		t = True
	n -= 1
if t:
	print('YES')
else:
	print('NO')


import sys
import math
import collections
import heapq
import decimal
input = sys.stdin.readline
n = int(input())
c1 = 0
for i in range(n):
	(a, b, c) = (i for i in input().split())
	b = int(b)
	c = int(c)
	if b >= 2400 and c > b:
		c1 = 1
		break
if c1 == 0:
	print('NO')
else:
	print('YES')


n = int(input())
found = False
for _ in range(n):
	(before, after) = map(int, input().split()[1:])
	if before >= 2400 and after > before:
		found = True
print(('NO', 'YES')[found])


t = 0
for i in range(int(input())):
	(n, a, b) = list(input().split())
	a = int(a)
	b = int(b)
	if a >= 2400 and a < b:
		t = 1
		break
print('YES') if t else print('NO')


n = int(input())
for i in range(n):
	(a, b, c) = input().split()
	(b, c) = (int(b), int(c))
	if 2400 <= b < c:
		print('YES')
		exit()
print('NO')


n = int(input())
status = 0
for i in range(n):
	(name, before, after) = input().split()
	if 2400 <= int(before) < int(after):
		status = 1
print('NYOE S'[status::2])


cases = int(input())
found = False
while cases:
	cases -= 1
	(s, a, b) = input().split()
	if 2400 <= int(a) < int(b):
		print('YES')
		found = True
		break
if not found:
	print('NO')


from sys import stdin, stdout
n = int(stdin.readline())
for i in range(n):
	(name, before, after) = stdin.readline().split()
	if int(before) >= 2400 and int(after) > int(before):
		stdout.write('YES')
		break
else:
	stdout.write('NO')


for _ in range(int(input())):
	l = input().split()
	if int(l[1]) >= 2400:
		if int(l[2]) > int(l[1]):
			print('YES')
			exit()
print('NO')


l = int(input())
n = []
d = 0
for i in range(l):
	c = list(map(str, input().split()))
	n.append(c)
for i in range(len(n)):
	if int(n[i][1]) >= 2400 and int(n[i][1]) < int(n[i][2]):
		d = 1
		break
if d == 1:
	print('YES')
else:
	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')


(n, ans) = (int(input()), 'NO')
r = [input().split() for i in range(n)]
for i in range(n):
	r[i] = int(r[i][2]) - int(r[i][1]) if int(r[i][1]) >= 2400 else -1
	if r[i] > 0:
		ans = 'YES'
print(ans)


n = int(input())
for i in range(n):
	(name, before, after) = map(str, input().split())
	if int(before) >= 2400 and int(after) - int(before) > 0:
		print('YES')
		exit(0)
print('NO')
exit(0)


r = 0
for _ in [0] * int(input()):
	(a, b) = map(int, input().split()[1:])
	r |= 2399 < a < b
print('NYOE S'[r::2])


z = 0
amount = int(input())
for i in range(amount):
	(name, before, after) = [i for i in input().split()]
	if int(before) >= 2400:
		if int(after) > int(before):
			z = 1
if z == 0:
	print('NO')
else:
	print('YES')


n = int(input())
ans = 0
for i in range(n):
	(x, y, z) = map(str, input().split())
	if int(y) >= 2400 and int(z) > 2400 and (int(z) > int(y)):
		ans += 1
if ans > 0:
	print('YES')
else:
	print('NO')


n = int(input())
for i in range(n):
	(_, x, y) = input().split()
	(x, y) = map(int, (x, y))
	if 2400 <= x < y:
		print('YES')
		exit()
print('NO')


n = int(input())
ans = 'NO'
for i in range(0, n):
	(name, bf, aft) = list(input().split())
	if int(aft) > int(bf) and int(bf) >= 2400:
		ans = 'YES'
print(ans)


n = int(input())
results = 'NO'
for x in range(n):
	string = input()
	user = string.split(' ')
	a = int(user[1])
	b = int(user[2])
	if a >= 2400 and b > a:
		results = 'YES'
print(results)


n = int(input())
b = False
l = []
for i in range(0, n):
	k = list(input().split())
	if int(k[1]) >= 2400 and int(k[2]) > int(k[1]):
		b = True
if b:
	print('YES')
else:
	print('NO')


n = input()
n = int(n)
answer = False
for i in range(n):
	s = input()
	(nick, before, after) = s.split()
	before = int(before)
	after = int(after)
	if after > before >= 2400:
		answer = True
if answer:
	print('YES')
else:
	print('NO')


def solve(di):
	for i in di.keys():
		if di[i][0] >= 2400 and di[i][1] > di[i][0]:
			return 'YES'
	return 'NO'
n = int(input())
di = {}
for i in range(n):
	(h, b, a) = map(str, input().split())
	if h not in di:
		ar = []
		ar.append(int(b))
		ar.append(int(a))
		di[h] = ar
print(solve(di))


import sys
import math
import bisect

def main():
	ans = False
	for _ in range(int(input())):
		(s, a, b) = input().split()
		a = int(a)
		b = int(b)
		if a >= 2400 and b > a:
			ans = True
	if ans:
		print('YES')
	else:
		print('NO')
main()


n = int(input())
for i in range(n):
	s = input().split()
	(name, before, after) = (s[0], int(s[1]), int(s[2]))
	if before >= 2400 and after - before > 0:
		print('YES')
		break
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())
f = False
for i in range(n):
	(before, after) = map(int, input().split()[1:])
	if before >= 2400 and after > before:
		f = True
if f:
	print('YES')
else:
	print('NO')


CHECK = False
for i in range(int(input())):
	_ = list(input().split())
	if int(_[1]) >= 2400 and int(_[2]) > int(_[1]):
		CHECK = True
print('YES' if CHECK else 'NO')


t = int(input())
c = 0
for i in range(t):
	(n, s, e) = input().split()
	s = int(s)
	e = int(e)
	if s >= 2400 and e >= 2400:
		if s < e:
			c = 1
if c == 1:
	print('YES')
else:
	print('NO')


from sys import stdout, stdin, setrecursionlimit
from io import BytesIO, IOBase
from collections import *
from itertools import *
from random import *
from bisect import *
from string import *
from queue import *
from heapq import *
from math import *
from re import *
from os import *

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = read(self._fd, max(fstat(self._fd).st_size, 8192))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = read(self._fd, max(fstat(self._fd).st_size, 8192))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(stdin, stdout) = (IOWrapper(stdin), IOWrapper(stdout))
(graph, mod, szzz) = ({}, 10 ** 9 + 7, lambda : sorted(zzz()))

def getInt():
	return int(input())

def listStr():
	return list(input())

def getStrs():
	return input().split()

def isInt(s):
	return '0' <= s[0] <= '9'

def input():
	return stdin.readline().strip()

def zzz():
	return [int(i) for i in input().split()]

def output(answer, end='\n'):
	stdout.write(str(answer) + end)

def lcd(xnum1, xnum2):
	return xnum1 * xnum2 // gcd(xnum1, xnum2)
dx = [-1, 1, 0, 0, 1, -1, 1, -1]
dy = [0, 0, 1, -1, 1, -1, -1, 1]
ans = False
for _ in range(getInt()):
	(a, b, c) = input().split()
	if int(b) >= 2400 and int(c) > int(b):
		ans = True
print('YES' if ans else 'NO')


n = int(input())
array = [input().split() for i in range(n)]
f = False
for i in array:
	if int(i[2]) > int(i[1]) and int(i[1]) >= 2400:
		f = True
		break
if f:
	print('YES')
else:
	print('NO')


from sys import stdin as Si, maxsize as m
from math import floor as F
from collections import defaultdict as dt, Counter as Co
from operator import itemgetter as ig
from math import pi
n = int(Si.readline())
P = []
for i in range(n):
	(N, b, a) = map(str, Si.readline().strip().split())
	if int(b) >= 2400 and int(a) > int(b):
		print('YES')
		break
else:
	print('NO')


from collections import deque, Counter
import array
from itertools import combinations, permutations
from math import sqrt

def read_int():
	return int(input().strip())

def read_int_array():
	return [int(i) for i in input().strip().split(' ')]
n = read_int()
for i in range(n):
	(n, b, a) = input().strip().split(' ')
	before = int(b)
	after = int(a)
	if before >= 2400 and before < after:
		print('YES')
		exit()
print('NO')


x = int(input())
mas = []
for i in range(x):
	mas.append(input().split())
	mas[i][1] = int(mas[i][1])
	mas[i][2] = int(mas[i][2])
for i in range(x):
	if mas[i][1] < mas[i][2] and mas[i][1] >= 2400:
		print('YES')
		break
else:
	print('NO')


import sys
n = int(input())
for i in range(n):
	(h, b, a) = input().split()
	(b, a) = (int(b), int(a))
	if a > b and b >= 2400:
		print('YES')
		sys.exit()
print('NO')


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


import math, string, itertools, fractions, heapq, collections, re, array, bisect, sys, random, time, copy, functools
sys.setrecursionlimit(10 ** 7)
inf = 10 ** 20
eps = 1.0 / 10 ** 10
mod = 10 ** 9 + 7
dd = [(-1, 0), (0, 1), (1, 0), (0, -1)]
ddn = [(-1, 0), (-1, 1), (0, 1), (1, 1), (1, 0), (1, -1), (0, -1), (-1, -1)]

def LI():
	return [int(x) for x in sys.stdin.readline().split()]

def LI_():
	return [int(x) - 1 for x in sys.stdin.readline().split()]

def LF():
	return [float(x) for x in sys.stdin.readline().split()]

def LS():
	return sys.stdin.readline().split()

def I():
	return int(sys.stdin.readline())

def F():
	return float(sys.stdin.readline())

def S():
	return input()

def pf(s):
	return print(s, flush=True)

def main():
	n = I()
	aa = [LS() for _ in range(n)]
	for (s, a, b) in aa:
		a = int(a)
		b = int(b)
		if a >= 2400 and a < b:
			return 'YES'
	return 'NO'
print(main())


red_line = 2400
answer = 'NO'
n = int(input())
for _ in range(n):
	(before, after) = map(int, input().split()[1:])
	if before >= red_line and after - before > 0:
		answer = 'YES'
		break
print(answer)