output_description: If the objective is achievable, print `Yes`; if it is not, print `No`.
  
  * * *
input_description: Input is given from Standard Input in the following format:
  
      
      
      N
      A_1 A_2 ... A_N
      B_1 B_2 ... B_N
attempt: N = int(input())
  List = [[int(j) for j in input().split()] for i in range(2)]
  
  ans = 1
  cnt = 0
  
  aa = sorted(List[0])
  bb = sorted(List[1])
  
  for i in range(len(List[0])):
      a = List[0][List[0].index(aa[N - 1 - i])]
      b = List[1][List[0].index(aa[N - 1 - i])]
      num = List[0].index(aa[N - 1 - i])
  
      if a > b:
          ind = List[1].index(bb[N - 1 - i])
          c = List[0][ind]
          List[0][ind] = a
          List[0][num] = c
          cnt = cnt + 1
  
  for i in range(len(List[0])):
      a = List[0][List[0].index(aa[N - 1 - i])]
      b = List[1][List[0].index(aa[N - 1 - i])]
      num = List[0].index(aa[N - 1 - i])
  
      if a > b:
          ind = List[1].index(bb[N - 1 - i])
          c = List[0][ind]
          List[0][ind] = a
          List[0][num] = c
          cnt = cnt + 1
  
  
  for i in range(len(List[0])):
      a = List[0][List[0].index(aa[N - 1 - i])]
      b = List[1][List[0].index(aa[N - 1 - i])]
      num = List[0].index(aa[N - 1 - i])
  
      if a > b:
          ind = List[1].index(bb[N - 1 - i])
          c = List[0][ind]
          List[0][ind] = a
          List[0][num] = c
          cnt = cnt + 1
  
  for i in range(len(List[0])):
      a = List[0][List[0].index(aa[N - 1 - i])]
      b = List[1][List[0].index(aa[N - 1 - i])]
      num = List[0].index(aa[N - 1 - i])
  
      if a > b:
          ind = List[1].index(bb[N - 1 - i])
          c = List[0][ind]
          List[0][ind] = a
          List[0][num] = c
          cnt = cnt + 1
  
  
  for i in range(len(List[0])):
      a = List[0][List[0].index(aa[N - 1 - i])]
      b = List[1][List[0].index(aa[N - 1 - i])]
      num = List[0].index(aa[N - 1 - i])
  
      if a > b:
          ind = List[1].index(bb[N - 1 - i])
          c = List[0][ind]
          List[0][ind] = a
          List[0][num] = c
          cnt = cnt + 1
  
  if cnt < N - 2:
      print("Yes")
  else:
      print("No")
  
problem_description: Statement
  
  Given are two integer sequences of N elements each: A_1,...,A_N and
  B_1,...,B_N. Determine if it is possible to do the following operation at most
  N-2 times (possibly zero) so that, for every integer i from 1 to N, A_i \leq
  B_i holds:
  
    * Choose two distinct integers x and y between 1 and N (inclusive), and swap the values of A_x and A_y.
samples: [{"input": "3\n    1 3 2\n    1 2 3", "output": "Yes\n    \n\nWe should swap the values of A_2 and A_3.\n\n* * *"}, {"input": "3\n    1 2 3\n    2 2 2", "output": "No\n    \n\n* * *"}, {"input": "6\n    3 1 2 6 3 4\n    2 2 8 3 4 3", "output": "Yes"}]