#include <bits/stdc++.h>
using namespace std;
int n,A[40001],B[40001];
 
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 win++;
      ans=i+1;
      if((i+1)/2<win)break;
    }
    if(ans<n)cout<<ans<<endl;
    else cout<<"NA"<<endl;
     
  }
  return 0;
}