#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, a[1100], b[1100], i, j, k;
  char ch;
  scanf("%d", &n);
  getchar();
  for (i = 0; i < n; i++) {
    scanf("%c", &ch);
    a[i] = ch - 48;
  }
  getchar();
  for (i = 0; i < n; i++) {
    scanf("%c", &ch);
    b[i] = ch - 48;
  }
  getchar();
  sort(a, a + n);
  sort(b, b + n);
  k = 0;
  j = -1;
  for (i = 0; i < n; i++) {
    j++;
    while (b[j] < a[i] && j < n) {
      j++;
      k++;
    }
    if (j == n || i == n - 1) {
      printf("%d\n", k);
      break;
    }
  }
  k = 0;
  j = -1;
  for (i = 0; i < n; i++) {
    j++;
    while (b[j] <= a[i] && j < n) j++;
    if (j < n) k++;
    if (j == n || i == n - 1) {
      printf("%d\n", k);
      break;
    }
  }
  return 0;
}
