#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  long long int t, n, i, j, b, q, m;
  cin >> n;
  vector<long long int> v(n);
  for (i = 0; i < n; ++i) cin >> v[i];
  sort(v.begin(), v.end());
  set<long long int> all;
  for (i = 0; i < n; ++i) {
    if (all.find(v[i] - 1) != all.end()) {
      continue;
    } else if (all.find(v[i]) != all.end()) {
      continue;
    } else {
      all.insert(v[i] + 1);
    }
  }
  cout << all.size() << " ";
  set<long long int> nall;
  for (i = 0; i < n; ++i) {
    if (nall.find(v[i] - 1) == nall.end()) {
      nall.insert(v[i] - 1);
      continue;
    }
    if (nall.find(v[i]) == nall.end()) {
      nall.insert(v[i]);
      continue;
    }
    nall.insert(v[i] + 1);
  }
  cout << nall.size() << "\n";
  return 0;
}
