#include <bits/stdc++.h>
#pragma comment(linker, "/stack:30000000")
using namespace std;
using namespace std;
int n;
int main() {
  cin >> n;
  string S, M;
  cin >> S >> M;
  sort(S.begin(), S.end());
  sort(M.begin(), M.end());
  int j = 0;
  for (int i = 0; i < n; i++)
    if (M[i] >= S[j]) j++;
  cout << n - j << endl;
  j = 0;
  for (int i = 0; i < n; i++)
    if (M[i] > S[j]) j++;
  cout << j;
  return 0;
}
