output_description: If Takahashi can buy the toy, print `Yes`; if he cannot, print `No`.
  
  * * *
input_description: Input is given from Standard Input in the following format:
  
      
      
      A B C
attempt: import sys
  
  
  def spam(ab, cd, count=0):
      ab = ab[:]
      cd = cd[:]
      for x in ab:
          for y in cd:
              if x[0] < y[0] and x[1] < y[1]:
                  ab.remove(x)
                  cd.remove(y)
                  return spam(ab, cd, count + 1)
      return count
  
  
  def main():
      N = int(sys.stdin.readline())
      ab = [[int(x) for x in sys.stdin.readline().split()] for _ in range(N)]
      cd = [[int(x) for x in sys.stdin.readline().split()] for _ in range(N)]
      ab1 = sorted(ab, key=lambda x: (x[0], x[1]))
      cd1 = sorted(cd, key=lambda x: (x[0], x[1]))
      ab2 = sorted(ab, key=lambda x: (x[1], x[0]))
      cd2 = sorted(cd, key=lambda x: (x[1], x[0]))
      print(max([spam(ab1, cd1), spam(ab2, cd2)]))
  
  
  if __name__ == "__main__":
      main()
  
problem_description: Statement
  
  An elementary school student Takahashi has come to a variety store.
  
  He has two coins, A-yen and B-yen coins (yen is the currency of Japan), and
  wants to buy a toy that costs C yen. Can he buy it?
  
  Note that he lives in Takahashi Kingdom, and may have coins that do not exist
  in Japan.
samples: [{"input": "50 100 120", "output": "Yes\n    \n\nHe has 50 + 100 = 150 yen, so he can buy the 120-yen toy.\n\n* * *"}, {"input": "500 100 1000", "output": "No\n    \n\nHe has 500 + 100 = 600 yen, but he cannot buy the 1000-yen toy.\n\n* * *"}, {"input": "19 123 143", "output": "No\n    \n\nThere are 19-yen and 123-yen coins in Takahashi Kingdom, which are rather hard\nto use.\n\n* * *"}, {"input": "19 123 142", "output": "Yes"}]