import sys

from operator import itemgetter

input = sys.stdin.readline

n = int(eval(input()))

l = [list(map(int,input().split())) for _ in range(n)]

l.sort(key=itemgetter(1))

a = 0

flag = 0

for _ in range(n):

  a += l[_][0]

  if a > l[_][1]:

    print('No')

    flag = 1

    break

if flag == 0:

  print('Yes')
import sys

from operator import itemgetter

input = sys.stdin.readline

n = int(eval(input()))

l = [tuple(map(int,input().split())) for _ in range(n)]

l.sort(key=itemgetter(1))

a = 0

flag = 0

for _ in range(n):

  a += l[_][0]

  if a > l[_][1]:

    print('No')

    flag = 1

    break

if flag == 0:

  print('Yes')
import sys
from operator import itemgetter

input = sys.stdin.readline
n = int(eval(input()))
l = [list(map(int, input().split())) for _ in range(n)]
l.sort(key=itemgetter(1))
a = 0
flag = 0
for _ in range(n):
    a += l[_][0]
    if a > l[_][1]:
        print("No")
        flag = 1
        break
if flag == 0:
    print("Yes")

import sys
from operator import itemgetter

input = sys.stdin.readline
n = int(eval(input()))
l = [tuple(map(int, input().split())) for _ in range(n)]
l.sort(key=itemgetter(1))
a = 0
flag = 0
for _ in range(n):
    a += l[_][0]
    if a > l[_][1]:
        print("No")
        flag = 1
        break
if flag == 0:
    print("Yes")

-l = [list(map(int, input().split())) for _ in range(n)] +l = [tuple(map(int, input().split())) for _ in range(n)]