n = int(eval(input()))

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



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



time = 0



for i,j in li:

    time += i

    if time > j:

        print('No')

        exit()



print('Yes')

import sys

input = sys.stdin.readline



n = int(eval(input()))

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



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



time = 0



for i,j in li:

    time += i

    if time > j:

        print('No')

        exit()



print('Yes')

n = int(eval(input()))
li = [list(map(int, input().split())) for _ in range(n)]
li.sort(key=lambda x: x[1])
time = 0
for i, j in li:
    time += i
    if time > j:
        print("No")
        exit()
print("Yes")

import sys

input = sys.stdin.readline
n = int(eval(input()))
li = [list(map(int, input().split())) for _ in range(n)]
li.sort(key=lambda x: x[1])
time = 0
for i, j in li:
    time += i
    if time > j:
        print("No")
        exit()
print("Yes")

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