import sys

input = sys.stdin.readline



n = int(eval(input()))

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



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



sum = 0

for cost, limit in ab:

    sum += cost

    if sum > limit:

        print('No')

        break

else:

    print('Yes')

import sys

input = sys.stdin.readline



n = int(eval(input()))

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



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



sum = 0

for cost, limit in ab:

    sum += cost

    if sum > limit:

        print('No')

        break

else:

    print('Yes')

import sys

input = sys.stdin.readline
n = int(eval(input()))
ab = [list(map(int, input().split())) for _ in range(n)]
ab.sort(key=lambda x: x[1])
sum = 0
for cost, limit in ab:
    sum += cost
    if sum > limit:
        print("No")
        break
else:
    print("Yes")

import sys

input = sys.stdin.readline
n = int(eval(input()))
ab = [tuple(map(int, input().split())) for _ in range(n)]
ab.sort(key=lambda x: x[1])
sum = 0
for cost, limit in ab:
    sum += cost
    if sum > limit:
        print("No")
        break
else:
    print("Yes")

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