# import bisect

import heapq

# import math

# import queue

import sys





def main():

    # 読み込み回数が多い場合

    input = sys.stdin.readline

    N = int(eval(input()))

    

    # heap queue

    h = []

    for i in range(N):

        A, B = list(map(int, input().split()))

        heapq.heappush(h, (B, A))

	

    time = 0

    while len(h) > 0:

        B, A = heapq.heappop(h)

        time += A

        if B < time:

            print("No")

            sys.exit()

    

    print("Yes")





if __name__ == "__main__":

    main()
# import bisect

# import heapq

# import math

# import queue

import sys





def main():

    # 読み込み回数が多い場合

    input = sys.stdin.readline

    N = int(eval(input()))

    

    # heap queue

    h = []

    for i in range(N):

        A, B = list(map(int, input().split()))

        h.append((B, A))

    h.sort()

	

    time = 0

    for B, A in h:

        time += A

        if B < time:

            print("No")

            sys.exit()

    

    print("Yes")





if __name__ == "__main__":

    main()
# import bisect
import heapq

# import math
# import queue
import sys


def main():
    # 読み込み回数が多い場合
    input = sys.stdin.readline
    N = int(eval(input()))
    # heap queue
    h = []
    for i in range(N):
        A, B = list(map(int, input().split()))
        heapq.heappush(h, (B, A))
    time = 0
    while len(h) > 0:
        B, A = heapq.heappop(h)
        time += A
        if B < time:
            print("No")
            sys.exit()
    print("Yes")


if __name__ == "__main__":
    main()

# import bisect
# import heapq
# import math
# import queue
import sys


def main():
    # 読み込み回数が多い場合
    input = sys.stdin.readline
    N = int(eval(input()))
    # heap queue
    h = []
    for i in range(N):
        A, B = list(map(int, input().split()))
        h.append((B, A))
    h.sort()
    time = 0
    for B, A in h:
        time += A
        if B < time:
            print("No")
            sys.exit()
    print("Yes")


if __name__ == "__main__":
    main()

-import heapq - +# import heapq -        heapq.heappush(h, (B, A)) +        h.append((B, A)) +    h.sort() -    while len(h) > 0: -        B, A = heapq.heappop(h) +    for B, A in h: