N = int(eval(input()))

A = [[None]*2 for i in range(N)]

for i in range(N):

    A[i][1],A[i][0] = list(map(int,input().split()))



A.sort()



zum = 0

now = 0

for i in range(N):

    zum += A[i][1]

    now = A[i][0]

    if zum > now:

        print("No")

        break

else:

    print("Yes")
import sys

input = sys.stdin.readline



N = int(eval(input()))

A = [[None]*2 for i in range(N)]

for i in range(N):

    A[i][1],A[i][0] = list(map(int,input().split()))



A.sort()



zum = 0

now = 0

for i in range(N):

    zum += A[i][1]

    now = A[i][0]

    if zum > now:

        print("No")

        break

else:

    print("Yes")
N = int(eval(input()))
A = [[None] * 2 for i in range(N)]
for i in range(N):
    A[i][1], A[i][0] = list(map(int, input().split()))
A.sort()
zum = 0
now = 0
for i in range(N):
    zum += A[i][1]
    now = A[i][0]
    if zum > now:
        print("No")
        break
else:
    print("Yes")

import sys

input = sys.stdin.readline
N = int(eval(input()))
A = [[None] * 2 for i in range(N)]
for i in range(N):
    A[i][1], A[i][0] = list(map(int, input().split()))
A.sort()
zum = 0
now = 0
for i in range(N):
    zum += A[i][1]
    now = A[i][0]
    if zum > now:
        print("No")
        break
else:
    print("Yes")

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