#include <bits/stdc++.h>
using namespace std;
const int INF = 0x7FFFFFFF;
const long long LINF = 0x7FFFFFFFFFFFFF;
void guan() {
  ios::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
}
const long long mod = 998244353;
const int maxn = 1010101;
char a[maxn], b[maxn];
int vis[maxn];
int main() {
  guan();
  int d, h, k, p;
  int n, m;
  while (cin >> n) {
    cin >> a + 1 >> b + 1;
    sort(b + 1, b + 1 + n);
    sort(a + 1, a + 1 + n);
    memset(vis, 0, sizeof(vis));
    int ans1 = n;
    for (int i = n; i >= 1; i--) {
      for (int j = n; j >= 1; j--) {
        if (vis[j]) continue;
        if (b[i] >= a[j]) {
          vis[j] = 1;
          ans1--;
          break;
        }
      }
    }
    int ans2 = 0;
    memset(vis, 0, sizeof(vis));
    for (int i = 1; i <= n; i++) {
      for (int j = 1; j <= n; j++) {
        if (vis[j]) continue;
        if (a[i] < b[j]) {
          ans2++;
          vis[j] = 1;
          break;
        }
      }
    }
    cout << ans1 << "\n" << ans2 << endl;
  }
  return 0;
}
