#include <cstdio>
#include <iostream>
#include <cstring>
#include <cmath>
#include <algorithm>
#include <fstream>
#include <cstdlib>
#include <functional> 

#define rep( i, l, r ) for (int i = l; i <= r; i++)
#define down( i, l, r ) for (int i = l; i >= r; i--)
#define MS 100009
#define MAX 2147483647

using namespace std;

int n, a[MS], b[MS], c;

int calc()
{
	int s, t, x, y, ans = 0;
	s = x = 1; t = y = n;
	while (s <= t)
	{
		if (a[s] > b[x]) ans += 2, s++, x++;
		else if (a[t] > b[y]) ans += 2, t--, y--;
		else ans +=(a[s] == b[y]), s++, y--;
	}
	return ans;
}

int main()
{
	scanf("%d", &n);
	rep(i, 1, n) scanf("%d", &a[i]); sort(a+1, a+1+n); 
	rep(i, 1, n) scanf("%d", &b[i]); sort(b+1, b+1+n); 
	cout << calc() << ' ';
	rep(i, 1, n) c = a[i], a[i] = b[i], b[i] = c;
	cout << 2*n-calc() << endl;
}
