#include <bits/stdc++.h>
using namespace std;
int n;
char s[1010], m[1010];
int vis[1010];
int main() {
  scanf("%d", &n);
  scanf("%s %s", s, m);
  sort(s, s + n);
  sort(m, m + n);
  int s_f = 0, m_f = 0;
  int p = 0;
  for (int i = 0; i < n; i++)
    for (int j = 0; j < n; j++) {
      if (m[i] >= s[j] && !vis[j]) {
        m_f++;
        vis[j] = 1;
        break;
      }
    }
  p = n - 1;
  for (int i = n - 1; i >= 0; i--) {
    while (p >= 0) {
      if (m[i] > s[p]) {
        s_f++;
        p--;
        break;
      }
      p--;
    }
  }
  printf("%d\n%d\n", n - m_f, s_f);
  return 0;
}
