#include <bits/stdc++.h>
using namespace std;
using ll = long long;
const int MAXN = 200005;
int n, in[MAXN];
bool vis[MAXN];
int main() {
  ios::sync_with_stdio(0), cin.tie(0);
  int mmin, mmax;
  while (cin >> n) {
    mmin = mmax = 0;
    memset(vis, 0, sizeof(vis));
    for (int i = 0; i < n; ++i) cin >> in[i];
    sort(in, in + n);
    for (int i = 0; i < n;) {
      int r = i;
      while (r < n && in[r] - in[i] <= 2) {
        r++;
      }
      i = r;
      mmin++;
    }
    for (int i = 0; i < n; ++i) {
      if (!vis[in[i] - 1]) {
        vis[in[i] - 1] = true;
        mmax++;
      } else if (!vis[in[i]]) {
        vis[in[i]] = true;
        mmax++;
      } else if (!vis[in[i] + 1]) {
        vis[in[i] + 1] = true;
        mmax++;
      }
    }
    cout << mmin << ' ' << mmax << '\n';
  }
  return 0;
}
