#include <bits/stdc++.h>
using namespace std;
void solve() {
  long long n;
  cin >> n;
  ;
  string s, m;
  cin >> s >> m;
  sort(s.begin(), s.end());
  sort(m.begin(), m.end());
  string s1 = s, m1 = m;
  long long mgive = 0, mtake = n;
  char c = s1[0];
  for (long long i = 0; i < m1.size(); i++) {
    c = m1[i];
    for (long long j = 0; j < s1.size(); j++) {
      if (c > s1[j]) {
        s1.erase(s1.begin() + j);
        mgive++;
        break;
      }
    }
  }
  for (long long i = 0; i < n; i++) {
    c = m[i];
    for (long long j = 0; j < s.size(); j++) {
      if (s[j] <= c) {
        s.erase(s.begin() + j);
        mtake--;
        break;
      }
    }
  }
  cout << mtake << "\n" << mgive << "\n";
}
signed main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  long long t = 1;
  while (t--) solve();
  return 0;
}
