#include <bits/stdc++.h>
using namespace std;
int main() {
  long long n, k;
  cin >> n;
  if (n == 1) {
    cout << "1 1";
    return 0;
  }
  vector<int> min(n + 2, 0);
  vector<int> max(n + 2, 0);
  for (int i = 0; i < n; i++) {
    cin >> k;
    min[k] = 1;
    max[k]++;
  }
  if (min[1] == 1) {
    min[1] = 0;
    min[2] = 2;
  }
  for (int i = 2; i < n; i++) {
    if (min[i] == 1) {
      if (min[i - 1] == 2) {
        min[i] = 0;
      } else {
        min[i] = 0;
        min[i + 1] = 2;
      }
    }
  }
  if (min[n] == 1) {
    if (min[n - 1] == 2) {
      min[n] = 0;
    }
  }
  for (int i = 1; i <= n; i++) {
    if (max[i] > 0 && max[i - 1] == 0) {
      max[i]--;
      max[i - 1]++;
    }
    if (max[i] > 1) {
      max[i + 1] += max[i - 1];
      max[i] = 1;
    }
  }
  int minimum = 0, maximum = 0;
  for (int i = 0; i <= n + 1; i++) {
    if (min[i] > 0) {
      minimum++;
    }
    if (max[i] > 0) {
      maximum++;
    }
  }
  cout << minimum << " " << maximum;
  return 0;
}
