#include <bits/stdc++.h>
using namespace std;
long long k = 0, n, check = 0, prev, m = -1, summa;
vector<int> use;
vector<vector<int> > out;
vector<long long> cost;
vector<long long> speed;
vector<int> order;
int main() {
  long long n, minres = 0, maxres = 0;
  char cur;
  string sher, mor;
  cin >> n;
  cin >> sher >> mor;
  multiset<char> s, s1;
  for (int i = 0; i < n; i++) {
    s.insert(mor[i]);
  }
  s1 = s;
  maxres = n;
  for (int i = 0; i < n; i++) {
    cur = sher[i];
    multiset<char>::iterator it = s.lower_bound(cur);
    if (it == s.end()) {
      minres++;
      s.erase(s.begin());
    } else {
      s.erase(it);
    }
  }
  for (int i = 0; i < n; i++) {
    cur = sher[i];
    multiset<char>::iterator it = s1.upper_bound(cur);
    if (it == s1.end()) {
      maxres--;
      s1.erase(s1.begin());
    } else {
      s1.erase(it);
    }
  }
  cout << minres << endl << maxres;
  return 0;
}
