import heapq



def main():

  n = int(eval(input()))

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



  pq = []



  for ab in abs:

    a,b = ab[0],ab[1]

    heapq.heappush(pq, tuple([b,a]))



  dl = 0

  tc = 0



  ans = "Yes"



  for i in range(n):

    ba = heapq.heappop(pq)

    dl = ba[0]

    tc += ba[1]

    if dl < tc:

      ans = "No"

      break

  print(ans)

  

if __name__ == "__main__":

  main()
import heapq

import sys

input = sys.stdin.readline



def main():

  n = int(eval(input()))

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



  pq = []



  for ab in abs:

    a,b = ab[0],ab[1]

    heapq.heappush(pq, tuple([b,a]))



  dl = 0

  tc = 0



  ans = "Yes"



  for i in range(n):

    ba = heapq.heappop(pq)

    dl = ba[0]

    tc += ba[1]

    if dl < tc:

      ans = "No"

      break

  print(ans)

  

if __name__ == "__main__":

  main()
import heapq


def main():
    n = int(eval(input()))
    abs = [tuple(map(int, input().split())) for _ in range(n)]
    pq = []
    for ab in abs:
        a, b = ab[0], ab[1]
        heapq.heappush(pq, tuple([b, a]))
    dl = 0
    tc = 0
    ans = "Yes"
    for i in range(n):
        ba = heapq.heappop(pq)
        dl = ba[0]
        tc += ba[1]
        if dl < tc:
            ans = "No"
            break
    print(ans)


if __name__ == "__main__":
    main()

import heapq
import sys

input = sys.stdin.readline


def main():
    n = int(eval(input()))
    abs = [tuple(map(int, input().split())) for _ in range(n)]
    pq = []
    for ab in abs:
        a, b = ab[0], ab[1]
        heapq.heappush(pq, tuple([b, a]))
    dl = 0
    tc = 0
    ans = "Yes"
    for i in range(n):
        ba = heapq.heappop(pq)
        dl = ba[0]
        tc += ba[1]
        if dl < tc:
            ans = "No"
            break
    print(ans)


if __name__ == "__main__":
    main()

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