N = int(eval(input()))

A, B = (

    list(zip(*(list(map(int, input().split())) for _ in range(N)))) if N else

    ((), ())

)



a, b = list(zip(*sorted(zip(A, B), key=lambda t: t[1])))



t = 0

ans = 'Yes'

for x, y in zip(a, b):

    t += x

    if t > y:

        ans = 'No'



print(ans)

from functools import reduce



# 出力

N = int(eval(input()))

A, B = (

    list(zip(*(list(map(int, input().split())) for _ in range(N)))) if N else

    ((), ())

)



# 〆切時刻が小さい順にgreedyに仕事を処理する

ans, _ = reduce(

    lambda acc, t:

        (

            'Yes' if acc[0] == 'Yes' and acc[1] + t[0] <= t[1] else

            'No',

            acc[1] + t[0]

        ),

    sorted(zip(A, B), key=lambda t: t[1]),

    ('Yes', 0)

)



# 出力

print(ans)

N = int(eval(input()))
A, B = (
    list(zip(*(list(map(int, input().split())) for _ in range(N)))) if N else ((), ())
)
a, b = list(zip(*sorted(zip(A, B), key=lambda t: t[1])))
t = 0
ans = "Yes"
for x, y in zip(a, b):
    t += x
    if t > y:
        ans = "No"
print(ans)

from functools import reduce

# 出力
N = int(eval(input()))
A, B = (
    list(zip(*(list(map(int, input().split())) for _ in range(N)))) if N else ((), ())
)
# 〆切時刻が小さい順にgreedyに仕事を処理する
ans, _ = reduce(
    lambda acc, t: (
        "Yes" if acc[0] == "Yes" and acc[1] + t[0] <= t[1] else "No",
        acc[1] + t[0],
    ),
    sorted(zip(A, B), key=lambda t: t[1]),
    ("Yes", 0),
)
# 出力
print(ans)

+from functools import reduce + +# 出力 -a, b = list(zip(*sorted(zip(A, B), key=lambda t: t[1]))) -t = 0 -ans = "Yes" -for x, y in zip(a, b): -    t += x -    if t > y: -        ans = "No" +# 〆切時刻が小さい順にgreedyに仕事を処理する +ans, _ = reduce( +    lambda acc, t: ( +        "Yes" if acc[0] == "Yes" and acc[1] + t[0] <= t[1] else "No", +        acc[1] + t[0], +    ), +    sorted(zip(A, B), key=lambda t: t[1]), +    ("Yes", 0), +) +# 出力