#include <bits/stdc++.h>
using namespace std;
char a[1005], b[1005];
int main() {
  int n, i;
  scanf("%d", &n);
  scanf("%s", a + 1);
  scanf("%s", b + 1);
  int ans1 = n, ans2 = 0;
  sort(a + 1, a + 1 + n);
  sort(b + 1, b + 1 + n);
  int lab = 1, cnt = 1;
  while (lab <= n) {
    if (a[cnt] < b[lab]) {
      cnt++;
      ans2++;
    }
    lab++;
  }
  lab = cnt = n;
  while (lab >= 1) {
    if (b[cnt] >= a[lab]) {
      ans1--;
      cnt--;
    }
    lab--;
  }
  cout << ans1 << endl;
  cout << ans2 << endl;
  return 0;
}
