#include <bits/stdc++.h>
using namespace std;
int main() {
  int N;
  cin >> N;
  vector<int> A(N);
  for (int i = 0; i < N; i++) cin >> A[i];
  sort(A.begin(), A.end());
  int mn = 0, last = -1;
  for (int i = 0; i < N; i++) {
    if (abs(last - A[i]) > 1) {
      last = A[i] + 1;
      mn++;
    }
  }
  last = -1;
  int mx = 0;
  for (int i = 0; i < N; i++) {
    if (last < A[i] - 1) {
      last = A[i] - 1;
      mx++;
    } else if (last < A[i]) {
      last = A[i];
      mx++;
    } else if (last < A[i] + 1) {
      last = A[i] + 1;
      mx++;
    }
  }
  cout << mn << " " << mx << endl;
  return 0;
}
