#include <bits/stdc++.h>
using namespace std;
signed main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  long long n;
  cin >> n;
  string a, b;
  cin >> a >> b;
  sort(a.begin(), a.end());
  sort(b.begin(), b.end());
  long long ans = 0;
  for (long long i = 0, j = 0; i < a.size(); i++) {
    if (a[j] > b[i])
      ans++;
    else
      j++;
  }
  cout << ans << endl;
  ans = 0;
  long long j = 0;
  for (long long i = 0; i < n; i++) {
    while (j < n and a[i] >= b[j]) j++;
    if (j < n) ans++, j++;
  }
  cout << ans << endl;
}
