output_description: If Kizahashi can complete all the jobs in time, print `Yes`; if he cannot,
  print `No`.
  
  * * *
input_description: Input is given from Standard Input in the following format:
  
      
      
      N
      A_1 B_1
      .
      .
      .
      A_N B_N
attempt: import io
  import sys
  
  
  def IN_S():
      return input()
  
  
  def IN_I():
      return int(input())
  
  
  def IN_L_I():
      return list(map(int, input().split()))
  
  
  def IN_L_S():
      return list(map(str, input().split()))
  
  
  def STR_SPLIT(s, n):
      for l in range(0, len(s), n):
          yield s[0 + l : n + l]
  
  
  def T_IN():
      global test_str
      sys.stdin = io.StringIO(test_str[1:-1])
  
  
  test_str = """
  30
  384 8895
  1725 9791
  170 1024
  4 11105
  2 6
  578 1815
  702 3352
  143 5141
  1420 6980
  24 1602
  849 999
  76 7586
  85 5570
  444 4991
  719 11090
  470 10708
  1137 4547
  455 9003
  110 9901
  15 8578
  368 3692
  104 1286
  3 4
  366 12143
  7 6649
  610 2374
  152 7324
  4 7042
  292 11386
  334 5720
  """
  
  
  def MAIN():
      # T_IN()
      if A():
          print("Yes")
      else:
          print("No")
  
  
  def A():
      n = IN_I()
      # [[a, b]]
      md = list([IN_L_I() for i in range(0, n)])
      md.sort(key=lambda x: (x[1]))
      total = 0
      for item in md:
          total += item[0]
          if total > item[1]:
              return False
  
      return True
  
  
  def B():
      return None
  
  
  def C():
      return None
  
  
  MAIN()
  
problem_description: Statement
  
  Kizahashi, who was appointed as the administrator of ABC at National Problem
  Workshop in the Kingdom of AtCoder, got too excited and took on too many jobs.
  
  Let the current time be time 0. Kizahashi has N jobs numbered 1 to N.
  
  It takes A_i units of time for Kizahashi to complete Job i. The deadline for
  Job i is time B_i, and he must complete the job before or at this time.
  
  Kizahashi cannot work on two or more jobs simultaneously, but when he
  completes a job, he can start working on another immediately.
  
  Can Kizahashi complete all the jobs in time? If he can, print `Yes`; if he
  cannot, print `No`.
samples: [{"input": "5\n    2 4\n    1 9\n    1 8\n    4 9\n    3 12", "output": "Yes\n    \n\nHe can complete all the jobs in time by, for example, doing them in the\nfollowing order:\n\n  * Do Job 2 from time 0 to 1.\n  * Do Job 1 from time 1 to 3.\n  * Do Job 4 from time 3 to 7.\n  * Do Job 3 from time 7 to 8.\n  * Do Job 5 from time 8 to 11.\n\nNote that it is fine to complete Job 3 exactly at the deadline, time 8.\n\n* * *"}, {"input": "3\n    334 1000\n    334 1000\n    334 1000", "output": "No\n    \n\nHe cannot complete all the jobs in time, no matter what order he does them in.\n\n* * *"}, {"input": "30\n    384 8895\n    1725 9791\n    170 1024\n    4 11105\n    2 6\n    578 1815\n    702 3352\n    143 5141\n    1420 6980\n    24 1602\n    849 999\n    76 7586\n    85 5570\n    444 4991\n    719 11090\n    470 10708\n    1137 4547\n    455 9003\n    110 9901\n    15 8578\n    368 3692\n    104 1286\n    3 4\n    366 12143\n    7 6649\n    610 2374\n    152 7324\n    4 7042\n    292 11386\n    334 5720", "output": "Yes"}]