#include <bits/stdc++.h>
using namespace std;
typedef pair<int,int> P;
int n;
int A[40001],B[40001];

int check(int k,set<P> S){
  int win=0;
  for(int i=n-k-1;i<n;i++){
    set<P>::iterator it=S.upper_bound(P(B[i],-1));
    if(it==S.end())it--;
    if(it->second<k)continue;
    win++;
    S.erase(it);
  }
  return win>k/2;
}

int main(){
  while(cin>>n,n){
    for(int i=0;i<n;i++) cin>>A[i];
    for(int i=0;i<n;i++) cin>>B[i];
    sort(A,A+n,greater<int>());
    sort(B,B+n,greater<int>());
    int ans=0,idx=0,win=0;
    for(int i=0;i<n;i++){
      if(B[idx]>=A[i])idx++;
      else if(B[idx]<A[i])win++;
      ans=i+1;
      if((i+1)/2<win)break;
    }
    if(ans<n)cout<<ans<<endl;
    else cout<<"NA"<<endl;
    
  }
  return 0;
}