#include <bits/stdc++.h>
using namespace std;
long long A[200005], B[200005];
int main() {
  long long n;
  scanf("%lld", &n);
  for (long long i = 1; i <= n; i++) {
    scanf("%lld", &A[i]);
    B[i] = A[i];
  }
  sort(A + 1, A + n + 1);
  long long mn = 0, mx = 0;
  for (long long i = 1; i <= n; i++) {
    if (i == 1) {
      B[i] = A[i] - 1;
      mx++;
    } else {
      if (A[i] == B[i - 1]) {
        mx++;
        B[i] = A[i] + 1;
      } else if (A[i] < B[i - 1]) {
        B[i] = B[i - 1];
      } else {
        if (abs(A[i] - B[i - 1]) == 1) {
          B[i] = A[i];
        } else {
          B[i] = A[i] - 1;
        }
        mx++;
      }
    }
  }
  for (long long i = 1; i <= n; i++) {
    if (i == 1) {
      B[i] = A[i] + 1;
      mn++;
    } else {
      if (A[i] <= B[i - 1]) {
        B[i] = B[i - 1];
      } else if (A[i] - B[i - 1] == 1) {
        B[i] = A[i] - 1;
      } else {
        B[i] = A[i] + 1;
        mn++;
      }
    }
  }
  printf("%lld %lld\n", mn, mx);
  return 0;
}
