#include <bits/stdc++.h>
using namespace std;
void solve();
int main() {
  int test = 1;
  while (test--) {
    solve();
  }
  return 0;
}
void solve() {
  int n;
  cin >> n;
  string a, b;
  cin >> a >> b;
  sort(a.begin(), a.end());
  sort(b.begin(), b.end());
  long long int i, j, t;
  for (i = j = t = 0; j < n; j++) {
    if (a[i] > b[j]) {
      t++;
    } else {
      i++;
    }
  }
  cout << t << endl;
  for (i = j = t = 0; i < n; i++) {
    while (j < n && a[i] >= b[j]) {
      j++;
    }
    if (j < n) {
      t++;
      j++;
    }
  }
  cout << t << endl;
  return;
}
