#include <bits/stdc++.h>
using namespace std;
long n;
vector<long> a;
int main() {
  cin >> n;
  long read;
  a.push_back(0);
  for (long i = 1; i <= n; i++) {
    cin >> read;
    a.push_back(read);
  }
  sort(a.begin(), a.end());
  bool prev = false;
  bool curr = false;
  bool next = false;
  long maxtotal = 0;
  long house = 0;
  long index = 1;
  while (house <= n + 1 and index <= n + 1) {
    if (a[index] == house) {
      if (not prev) {
        prev = true;
        maxtotal++;
      } else if (not curr) {
        curr = true;
        maxtotal++;
      } else if (not next) {
        next = true;
        maxtotal++;
      }
      index++;
    } else {
      house++;
      prev = curr;
      curr = next;
      next = false;
    }
  }
  prev = false;
  curr = false;
  next = false;
  house = 0;
  index = 1;
  long mintotal = 0;
  while (house <= n and index <= n) {
    if (a[index] == house) {
      if (not prev and not curr and not next) {
        next = true;
        mintotal++;
      }
      index++;
    } else {
      house++;
      prev = curr;
      curr = next;
      next = false;
    }
  }
  cout << mintotal << ' ' << maxtotal << '\n';
}
