//qscqesze
#include <cstdio>
#include <cmath>
#include <cstring>
#include <ctime>
#include <iostream>
#include <algorithm>
#include <set>
#include <bitset>
#include <vector>
#include <sstream>
#include <queue>
#include <typeinfo>
#include <fstream>
#include <map>
#include <stack>
typedef long long ll;
using namespace std;
//freopen("D.in","r",stdin);
//freopen("D.out","w",stdout);
#define sspeed ios_base::sync_with_stdio(0);cin.tie(0)
#define maxn 200500
#define mod 1001
#define eps 1e-9
#define pi 3.1415926
int Num;
//const int inf=0x7fffffff;
const ll inf=999999999;
inline ll read()
{
ll x=0,f=1;char ch=getchar();
while(ch<‘0‘||ch>‘9‘){if(ch==‘-‘)f=-1;ch=getchar();}
while(ch>=‘0‘&&ch<=‘9‘){x=x*10+ch-‘0‘;ch=getchar();}
return x*f;
}
//*************************************************************************************
int a[maxn];
int b[maxn];
int n;
int solve()
{
int ans=0,mina=1,minb=1,maxa=n,maxb=n;
while(mina<=maxa)
{
if(a[mina]>b[minb])ans+=2,mina++,minb++;
else if(a[maxa]>b[maxb])ans+=2,maxa--,maxb--;
else ans+=(a[mina]==b[maxb]),mina++,maxb--;
}
return ans;
}
int main()
{
n=read();
for(int i=1;i<=n;i++)
scanf("%d",&a[i]);
for(int i=1;i<=n;i++)
scanf("%d",&b[i]);
sort(a+1,a+1+n);
sort(b+1,b+1+n);
printf("%d ",solve());
swap(a,b);
printf("%d\n",2*n-solve());
}