1 #include <cstdio>
2 #include <cstring>
3 #include <cstdlib>
4 #include <cmath>
5 #include <deque>
6 #include <vector>
7 #include <queue>
8 #include <iostream>
9 #include <algorithm>
10 #include <map>
11 #include <set>
12 #include <ctime>
13 using namespace std;
14 typedef long long LL;
15 typedef double DB;
16 #define For(i, s, t) for(int i = (s); i <= (t); i++)
17 #define Ford(i, s, t) for(int i = (s); i >= (t); i--)
18 #define Rep(i, t) for(int i = (0); i < (t); i++)
19 #define Repn(i, t) for(int i = ((t)-1); i >= (0); i--)
20 #define rep(i, x, t) for(int i = (x); i < (t); i++)
21 #define MIT (2147483647)
22 #define INF (1000000001)
23 #define MLL (1000000000000000001LL)
24 #define sz(x) ((int) (x).size())
25 #define clr(x, y) memset(x, y, sizeof(x))
26 #define puf push_front
27 #define pub push_back
28 #define pof pop_front
29 #define pob pop_back
30 #define ft first
31 #define sd second
32 #define mk make_pair
33 inline void SetIO(string Name) {
34 string Input = Name+".in",
35 Output = Name+".out";
36 freopen(Input.c_str(), "r", stdin),
37 freopen(Output.c_str(), "w", stdout);
38 }
39
40 const int N = 100010;
41 int n, A[N], B[N];
42
43 inline void Input() {
44 scanf("%d", &n);
45 For(i, 1, n) scanf("%d", &A[i]);
46 For(i, 1, n) scanf("%d", &B[i]);
47 }
48
49 inline int Work(int *A, int *B) {
50 int Ret = 0, HA, TA, HB, TB;
51 HA = HB = 1, TA = TB = n;
52 For(i, 1, n)
53 if(A[HA] > B[HB]) Ret += 2, HA++, HB++;
54 else if(A[TA] > B[TB]) Ret += 2, TA--, TB--;
55 else {
56 if(A[HA] == B[TB]) Ret++;
57 HA++, TB--;
58 }
59 return Ret;
60 }
61
62 inline void Solve() {
63 sort(A+1, A+1+n);
64 sort(B+1, B+1+n);
65
66 printf("%d %d\n", Work(A, B), 2*n-Work(B, A));
67 }
68
69 int main() {
70 #ifndef ONLINE_JUDGE
71 SetIO("1034");
72 #endif
73 Input();
74 Solve();
75 return 0;
76 }