#include <bits/stdc++.h>
using namespace std;
int main() {
  long long n, m, a, b, c, e, f, g, p, q, r, fr, sc, tr, sz, tz, sz1, sz2, i, j,
      k;
  long long x = 0, y = 0, cnt = 0, res = 0, ttl = 0, ans = 0, sum = 0;
  vector<long long> u, v, w;
  map<long long, long long> mp, nq, qr, bak, stl, fnt;
  scanf("%lld", &n);
  for (i = 0; i < n; i++) {
    scanf("%lld", &a);
    w.push_back(a);
    if (mp[a] == 0) {
      v.push_back(a);
      mp[a] = 1;
    }
  }
  sz = v.size();
  sort(v.begin(), v.end());
  cnt = 1;
  f = v[0];
  for (i = 1; i < sz; i++) {
    fr = v[i];
    if (fr - f <= 2) {
      cnt++;
    } else {
      ans++;
      f = v[i];
      cnt = 1;
    }
  }
  ans++;
  sort(w.begin(), w.end());
  for (i = 0; i < n; i++) {
    fr = w[i];
    if (bak[fr] == 0) {
      res++;
      bak[fr] = 1;
      stl[fr - 1] = 1;
    } else if (stl[fr] == 0) {
      res++;
      stl[fr] = 1;
      bak[fr + 1] = 1;
    } else if (fnt[fr] == 0) {
      res++;
      fnt[fr] = 1;
      stl[fr + 1] = 1;
      bak[fr + 2] = 1;
    }
  }
  printf("%lld %lld\n", ans, res);
  return 0;
}
