#include <bits/stdc++.h>
using namespace std;
inline long long bip(long long x, long long n, long long mod) {
  long long res = 1;
  while (n) {
    if (n & 1) {
      res = (res * x) % mod;
    }
    x = (x * x) % mod;
    n >>= 1;
  }
  return res;
}
const int maxn = 1e9;
const long long inf = 1e18;
const int mod = 1e9 + 7;
const int N = 2e5 + 10;
int n, h[N], a[N], c[N];
void solve() {
  cin >> n;
  for (int i = 1; i <= n; i++) {
    int x;
    cin >> x;
    h[x]++;
    a[x]++;
  }
  int ans = 0;
  for (int i = 1; i <= n; i++) {
    if (h[i]) {
      if (!c[i]) {
        if (!c[i - 1]) c[i + 1] = 1;
      }
    }
  }
  for (int i = 0; i <= n + 1; i++) ans += c[i];
  cout << ans << ' ';
  for (int i = 0; i <= n + 1; i++) h[i] = 0;
  ans = 0;
  for (int i = 1; i <= n; i++) {
    if (a[i]) {
      if (a[i] <= 2) {
        if (a[i] == 1) {
          if (h[i - 1] & h[i])
            h[i + 1] = 1;
          else if (!h[i - 1])
            h[i - 1] = 1;
          else
            h[i] = 1;
        } else {
          if (h[i]) {
            h[i - 1] = 1;
            h[i + 1] = 1;
          } else {
            if (h[i - 1])
              h[i] = 1, h[i + 1] = 1;
            else
              h[i] = 1, h[i - 1] = 1;
          }
        }
      } else {
        h[i] = 1;
        h[i + 1] = 1;
        h[i - 1] = 1;
      }
    }
  }
  for (int i = 0; i <= n + 1; i++) ans += h[i];
  cout << ans;
}
int main() {
  ios_base::sync_with_stdio(0), cin.tie(0), cout.tie(0);
  int tt = 1;
  while (tt--) {
    solve();
    cout << '\n';
  }
}
