n=int(eval(input()))

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

l.sort(key=lambda x:x[1])

t=0

for i in l:

    a,b=i

    t+=a

    if(t>b):

        print("No")

        break

else:

    print("Yes")
import sys

input=sys.stdin.readline

n=int(eval(input()))

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

l.sort(key=lambda x:x[1])

t=0

for i in l:

    a,b=i

    t+=a

    if(t>b):

        print("No")

        break

else:

    print("Yes")
n = int(eval(input()))
l = [list(map(int, input().split())) for i in range(n)]
l.sort(key=lambda x: x[1])
t = 0
for i in l:
    a, b = i
    t += a
    if t > b:
        print("No")
        break
else:
    print("Yes")

import sys

input = sys.stdin.readline
n = int(eval(input()))
l = [list(map(int, input().split())) for i in range(n)]
l.sort(key=lambda x: x[1])
t = 0
for i in l:
    a, b = i
    t += a
    if t > b:
        print("No")
        break
else:
    print("Yes")

+import sys + +input = sys.stdin.readline