### main

while true
  n = gets.strip.to_i
  break if n == 0

  as = gets.strip.split(' ').map{|s| s.to_i}.sort{|a, b| b <=> a}
  bs = gets.strip.split(' ').map{|s| s.to_i}.sort{|a, b| b <=> a}

  done = false
  win = 0

  for k in (1...n)
    win = 0
    for i in (0...k)
      if as[i] > bs[k - 1 - i]
        win += 1
      end
    end
    if win * 2 > k
      done = true
      puts k
      break
    end
  end

  if ! done
    puts 'NA'
  end
end