#include <bits/stdc++.h>
using namespace std;
int main(){
  int n;
  while(cin>>n,n){
    int a[n],b[n],i,c=0,p=0;
    for(i=0;i<n;i++)cin>>a[i];
    for(i=0;i<n;i++)cin>>b[i];
    sort(a,a+n,greater<int>());
    sort(b,b+n,greater<int>());
    for(i=0;i<n&&!p;i++){
      if(a[i]>b[i-c])c++;
      if(c>(i+1)/2)p=i+1;
    }
    if(p>0&&p<n)cout<<p<<endl;
    else cout<<"NA"<<endl;
  }
}