#include <bits/stdc++.h>
using namespace std;
int n;
char a[1010];
char b[1010];
int dp[1010][1010];
int lcs(bool eq) {
  fill((int*)dp, (int*)dp + 1010 * 1010, 0);
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < n; j++) {
      if (b[j] > a[i] || (eq && b[j] == a[i])) {
        dp[i + 1][j + 1] = dp[i][j] + 1;
      } else {
        dp[i + 1][j + 1] = max(dp[i][j + 1], dp[i + 1][j]);
      }
    }
  }
  return dp[n][n];
}
int main() {
  scanf("%d", &n);
  scanf("%s%s", a, b);
  sort(a, a + n);
  sort(b, b + n);
  printf("%d\n", n - lcs(true));
  printf("%d\n", lcs(false));
}
