#include<iostream>
#include<vector>
#include<string>
#include<algorithm>
#include<map>
#include<set>
#include<utility>
#include<cmath>
#include<cstring>
#include<queue>
#include<cstdio>
#include<sstream>
#define loop(i,a,b) for(int i=a;i<b;i++) 
#define rep(i,a) loop(i,0,a)
#define pb push_back
#define mp make_pair
#define all(in) in.begin(),in.end()
const double PI=acos(-1);
const double EPS=1e-8;
const int inf=1e9;
using namespace std;
typedef long long ll;
typedef vector<int> vi;
typedef vector<vi> vvi;
typedef pair<int,int> pii;
int main(){
	int n;
	while(cin>>n,n){
		vi a(n),b(n);
		rep(i,n)cin>>a[i];
		rep(i,n)cin>>b[i];
		sort(all(a));
		sort(all(b));
		reverse(all(a));
		reverse(all(b));
		int co=0,t=0;
		rep(i,n-1){	
			if(a[i]>b[t]){
				co++;
			}else t++;
			if(co>(i+1)/2){
				cout<<i+1<<endl;
				goto end;
			}
		}
		cout<<"NA"<<endl;
		end:;
	}
}