# encoding:utf-8

import copy

import random

import bisect #bisect_left　これで二部探索の大小検索が行える

import fractions #最小公倍数などはこっち

import math

import sys



mod = 10**9+7

sys.setrecursionlimit(mod) # 再帰回数上限はでdefault1000



def LI(): return list(map(int, sys.stdin.readline().split()))



N = int(eval(input()))

BA = [[] for i in range(N)]

for i in range(N):

    A,B = LI()

    BA[i] = [B,A]





BA.sort()

part_A = [0 for i in range(N)]

for i in range(N):

    B,A = BA[i]

    part_A[i] = A + part_A[i-1]



for i in range(N):

    B,A = BA[i]

    if B - part_A[i]>= 0:

        pass

    else:

        print("No")

        break

else:

    print("Yes")

# encoding:utf-8

import copy

import random

import bisect #bisect_left　これで二部探索の大小検索が行える

import fractions #最小公倍数などはこっち

import math

import sys



mod = 10**9+7

sys.setrecursionlimit(mod) # 再帰回数上限はでdefault1000



def LI(): return list(map(int, sys.stdin.readline().split()))



N = int(eval(input()))

BA = [[] for i in range(N)]

for i in range(N):

    a,b = LI()

    BA[i] = (b,a)



BA.sort()

part_A = [0 for i in range(N)]

for i in range(N):

    B,A = BA[i]

    part_A[i] = A + part_A[i-1]



for i in range(N):

    B,A = BA[i]

    if B - part_A[i] < 0:

        print("No")

        break

else:

    print("Yes")

# encoding:utf-8
import copy
import random
import bisect  # bisect_left　これで二部探索の大小検索が行える
import fractions  # 最小公倍数などはこっち
import math
import sys

mod = 10**9 + 7
sys.setrecursionlimit(mod)  # 再帰回数上限はでdefault1000


def LI():
    return list(map(int, sys.stdin.readline().split()))


N = int(eval(input()))
BA = [[] for i in range(N)]
for i in range(N):
    A, B = LI()
    BA[i] = [B, A]
BA.sort()
part_A = [0 for i in range(N)]
for i in range(N):
    B, A = BA[i]
    part_A[i] = A + part_A[i - 1]
for i in range(N):
    B, A = BA[i]
    if B - part_A[i] >= 0:
        pass
    else:
        print("No")
        break
else:
    print("Yes")

# encoding:utf-8
import copy
import random
import bisect  # bisect_left　これで二部探索の大小検索が行える
import fractions  # 最小公倍数などはこっち
import math
import sys

mod = 10**9 + 7
sys.setrecursionlimit(mod)  # 再帰回数上限はでdefault1000


def LI():
    return list(map(int, sys.stdin.readline().split()))


N = int(eval(input()))
BA = [[] for i in range(N)]
for i in range(N):
    a, b = LI()
    BA[i] = (b, a)
BA.sort()
part_A = [0 for i in range(N)]
for i in range(N):
    B, A = BA[i]
    part_A[i] = A + part_A[i - 1]
for i in range(N):
    B, A = BA[i]
    if B - part_A[i] < 0:
        print("No")
        break
else:
    print("Yes")

-    A, B = LI() -    BA[i] = [B, A] +    a, b = LI() +    BA[i] = (b, a) -    if B - part_A[i] >= 0: -        pass -    else: +    if B - part_A[i] < 0: