from operator import itemgetter

from itertools import accumulate

 

n = int(eval(input()))

a = sorted(tuple(map(int, reversed(input().split()))) for _ in range(n))

c, d = (list(map(itemgetter(i), a)) for i in (0, 1))

print(('YNeos'[any(x < y for x, y in zip(c, accumulate(d)))::2]))                    

from operator import itemgetter

from itertools import accumulate

 

n = int(eval(input()))

a = sorted((tuple(map(int, input().split())) for _ in range(n)),

           key=itemgetter(1))

c, d = (list(map(itemgetter(i), a)) for i in (0, 1))

print(('YNeos'[any(x > y for x, y in zip(accumulate(c), d))::2]))
from operator import itemgetter
from itertools import accumulate

n = int(eval(input()))
a = sorted(tuple(map(int, reversed(input().split()))) for _ in range(n))
c, d = (list(map(itemgetter(i), a)) for i in (0, 1))
print(("YNeos"[any(x < y for x, y in zip(c, accumulate(d))) :: 2]))

from operator import itemgetter
from itertools import accumulate

n = int(eval(input()))
a = sorted((tuple(map(int, input().split())) for _ in range(n)), key=itemgetter(1))
c, d = (list(map(itemgetter(i), a)) for i in (0, 1))
print(("YNeos"[any(x > y for x, y in zip(accumulate(c), d)) :: 2]))

-a = sorted(tuple(map(int, reversed(input().split()))) for _ in range(n)) +a = sorted((tuple(map(int, input().split())) for _ in range(n)), key=itemgetter(1)) -print(("YNeos"[any(x < y for x, y in zip(c, accumulate(d))) :: 2])) +print(("YNeos"[any(x > y for x, y in zip(accumulate(c), d)) :: 2]))