#import sys

#input = sys.stdin.readline



n=int(eval(input()))

ab=[[int(i) for i in input().split()] for j in range(n)]

ab=sorted(ab,key=lambda x:x[1])



w=0

t=0

ans='Yes'

for a,b in ab:

    w+=a

    if b<w:

        ans='No'

    

print(ans)
import sys

input = sys.stdin.readline



n=int(eval(input()))

ab=[[int(i) for i in input().split()] for j in range(n)]

ab=sorted(ab,key=lambda x:x[1])



w=0

t=0

ans='Yes'

for a,b in ab:

    w+=a

    if b<w:

        ans='No'

    

print(ans)
# import sys
# input = sys.stdin.readline
n = int(eval(input()))
ab = [[int(i) for i in input().split()] for j in range(n)]
ab = sorted(ab, key=lambda x: x[1])
w = 0
t = 0
ans = "Yes"
for a, b in ab:
    w += a
    if b < w:
        ans = "No"
print(ans)

import sys

input = sys.stdin.readline
n = int(eval(input()))
ab = [[int(i) for i in input().split()] for j in range(n)]
ab = sorted(ab, key=lambda x: x[1])
w = 0
t = 0
ans = "Yes"
for a, b in ab:
    w += a
    if b < w:
        ans = "No"
print(ans)

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