#include <algorithm>
#include <iostream>
#include <vector>

using namespace std;

typedef long long ll;
typedef vector<int> vi;
typedef vector<vi> vvi;
typedef pair<int, int> pii;

#define reps(i,f,n) for(int i=f; i<int(n); ++i)
#define rep(i,n) reps(i,0,n)

void func(int N)
{
    vi a(N), b(N);
    rep(i, N) cin >> a[i];
    rep(i, N) cin >> b[i];
    
    sort(a.rbegin(), a.rend());
    sort(b.rbegin(), b.rend());
    
    int c = 0;
    rep(k, N-1){
        if(b[c] >= a[k]){
            ++c;
        }
        if(k+1 > 2*c){
            cout << k+1 << endl;
            return;
        }
    }
    
    cout << "NA" << endl;
}

int main()
{
    int N;
    while(cin >> N, N){
        func(N);
    }
}