#include <bits/stdc++.h>
using namespace std;
multiset<int> sh, V;
int n;
string cc;
int solv2(string s) {
  int ii = 0;
  for (int i = 0; i < n; ++i) {
    int ee = cc[i] - '0';
    if (V.count(ee)) {
      V.erase(V.find(ee));
      continue;
    }
    int now = *(V.upper_bound(ee));
    if (now == 1000) {
      now = *(V.begin());
      V.erase(V.find(now));
      ii++;
    } else {
      V.erase(V.find(now));
    }
  }
  return ii;
}
int solv(string s) {
  int ii = 0;
  for (int i = 0; i < n; ++i) {
    int ee = cc[i] - '0';
    int now = *(V.upper_bound(ee));
    if (now == 1000) {
      now = *(V.begin());
      V.erase(V.find(now));
    } else {
      V.erase(V.find(now));
      ii++;
    }
  }
  return ii;
}
int main() {
  cin >> n;
  string s;
  cin >> cc;
  V.clear();
  cin >> s;
  for (int i = 0; i < n; ++i) {
    V.insert(s[i] - '0');
  }
  V.insert(1000);
  cout << solv2(s) << endl;
  V.clear();
  for (int i = 0; i < n; ++i) {
    V.insert(s[i] - '0');
  }
  V.insert(1000);
  cout << solv(s) << endl;
}
