#include <bits/stdc++.h>
using namespace std;

int n;
int a[40000];
int b[40000];
int cnt[40000];

int solve()
{
	sort(a, a + n, greater<int>());
	sort(b, b + n, greater<int>());
	memset(cnt, 0, sizeof cnt);
	for (int i = 0, j = 0; i < n; i++){
		while (j < n && a[j] > b[i]) j++;
		if (j == n) break;
		cnt[j++] = 1;
	}
	for (int i = 1; i < n; i++) cnt[i] += cnt[i - 1];
	for (int i = 0; i < n; i++) cnt[i] = i + 1 - cnt[i];
	
	for (int i = 0; i < n - 1; i++){
		if (i + 1 < cnt[i] * 2) return i + 1;
	}
	return -1;
}

int main()
{
	while (scanf("%d", &n), n){
		for (int i = 0; i < n; i++){
			scanf("%d", a + i);
		}
		for (int i = 0; i < n; i++){
			scanf("%d", b + i);
		}
		int res = solve();
		if (compl res) printf("%d\n", res);
		else puts("NA");
	}
}