#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  int n;
  cin >> n;
  vector<long long> x(n);
  for (int i = (0); i < (n); ++i) cin >> x[i];
  sort(x.begin(), x.end());
  map<int, bool> m;
  map<int, bool> mi;
  int big = 0;
  int small = 0;
  for (int i = (0); i < (n); ++i) {
    ++big;
    if (not m[x[i] - 1])
      m[x[i] - 1] = true;
    else if (not m[x[i]])
      m[x[i]] = true;
    else if (not m[x[i] + 1])
      m[x[i] + 1] = true;
    else
      --big;
    if (mi[x[i] - 1] or mi[x[i]] or mi[x[i] + 1]) continue;
    mi[x[i] + 1] = true;
    ++small;
  }
  cout << small << ' ' << big << endl;
}
