#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(0);
  int n, a;
  string sa, sb;
  cin >> n;
  cin >> sa >> sb;
  sort(sa.begin(), sa.end());
  sort(sb.begin(), sb.end());
  a = 0;
  for (int i = 0, j = 0; i < n; i++) {
    while (j < n && sb[j] < sa[i]) j++;
    if (j < n) a++;
    j++;
  }
  cout << n - a << "\n";
  a = 0;
  for (int i = 0, j = 0; i < n; i++) {
    while (j < n && sb[j] <= sa[i]) j++;
    if (j < n) a++;
    j++;
  }
  cout << a << "\n";
}
