#include <bits/stdc++.h>
using namespace std;
const int INF = 1000000000;
const int MOD = 1000000007;
map<int, int> mp;
signed main() {
  ios::sync_with_stdio(false);
  cin.tie(nullptr);
  int n;
  cin >> n;
  int x[n];
  for (int i = 0; i < n; i++) cin >> x[i];
  sort(x, x + n);
  int res1 = 0;
  for (int i = 0; i < n; i++) {
    if (!mp[x[i]]) {
      ++res1;
      mp[x[i]] = 1;
      mp[x[i] + 1] = 1;
      mp[x[i] + 2] = 1;
    }
  }
  mp.clear();
  int res2 = 0;
  for (int i = 0; i < n; i++) {
    if (!mp[x[i] - 1]) {
      ++res2;
      mp[x[i] - 1] = 1;
    } else if (!mp[x[i]]) {
      ++res2;
      mp[x[i]] = 1;
    } else if (!mp[x[i] + 1]) {
      ++res2;
      mp[x[i] + 1] = 1;
    }
  }
  cout << res1 << ' ' << res2 << '\n';
  return 0;
}
