#include<bits/stdc++.h>
using namespace std;

#define reps(i,j,n) for(int i = (j) ; i < (int)(n) ; ++i)    
#define rep(i,n) reps(i,0,n)  
#define each(it,c) for(__typeof (c).begin() it = (c).begin(); it != (c).end(); it++)  
  
#define all(v) (v).begin(), (v).end()  
#define pb(x) push_back(x)  
#define sz(x) (int)((x).size())  
#define UNQ(s) {sort(ALL(s));(s).erase(unique(ALL(s)),(s).end());}   
#define fr first  
#define sc second  
  
typedef pair< int , int > Pi;  
typedef pair< int , Pi > Pii;

  
typedef long long int64;  
const int INF = 1 << 30;  
  
template<typename T1, typename T2> istream& operator>>(istream& is, pair<T1,T2>& a){ return is>>a.first>>a.second; }  
template<typename T1, typename T2> ostream& operator<<(ostream& os, pair<T1,T2>& a){ return os<<a.first<<" "<<a.second; }  
template<typename T> istream& operator>>(istream& is, vector< T >& vc){ rep(i,sz(vc)) is >> vc[i]; return is;}  
template<typename T> ostream& operator<<(ostream& os, vector< T >& vc){ rep(i,sz(vc)) os << vc[i] << endl; return os; }  

int main(){
  int N;
  while(cin >> N, N){
    vector< int > a(N), b(N), cnt(N, 0);
    cin >> a;
    cin >> b;
    sort( a.rbegin(), a.rend());
    sort( b.rbegin(), b.rend());

    int s = 0, t = 0;
    while(t < a.size() && s < b.size()){
      while( a[t] > b[s] && t < a.size()) t++;
      if( t < a.size() && b[s] >= a[t]){ //負ける可能性がある
        cnt[t]++;
        t++, s++;
      }
    }

    for(int i = 1 ; i < N ; i++ ){
      cnt[i] += cnt[i-1];
    }

    int ret = -1;
    for(int i = 1; i < N; i++){
      if(i - cnt[i - 1] >= (i + 2) / 2){
        ret = i;
        break;
      }
    }
    if(~ret) cout << ret << endl;
    else cout << "NA" << endl;
  }
}