#include <bits/stdc++.h>
using namespace std;
long long int fastpow(long long int tab, long long int us) {
  if (tab == 0) return 0;
  if (tab == 1) return 1;
  if (us == 0) return 1;
  if (us == 1) return tab % 1000000007;
  tab %= 1000000007;
  if (us % 2 == 1) return tab * fastpow(tab, us - 1) % 1000000007;
  long long int a = fastpow(tab, us / 2) % 1000000007;
  return a * a % 1000000007;
}
long long int t = 1, n;
vector<bool> cev1, cev2;
vector<long long int> dizi;
void solve() {
  long long int i, j, a = 0, b = 0, k;
  cin >> n;
  cev1.resize(n + 2);
  cev2.resize(n + 2);
  dizi.resize(n + 1);
  for (i = 1; i <= n; i++) cin >> dizi[i];
  sort(dizi.begin(), dizi.end());
  for (i = 1; i <= n; i++) {
    if (!cev1[dizi[i] - 1] and !cev1[dizi[i]] and !cev1[dizi[i] + 1]) {
      a++;
      cev1[dizi[i] + 1] = 1;
    }
  }
  for (i = 1; i <= n; i++) {
    if (!cev2[dizi[i] - 1]) {
      cev2[dizi[i] - 1] = 1;
      b++;
    } else if (!cev2[dizi[i]]) {
      cev2[dizi[i]] = 1;
      b++;
    } else if (!cev2[dizi[i] + 1]) {
      cev2[dizi[i] + 1] = 1;
      b++;
    }
  }
  cout << a << " " << b;
  return;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  while (t--) solve();
  return 0;
}
