#include <bits/stdc++.h>
using namespace std;
inline void updMx(long long &a, long long b) {
  if (a < b) a = b;
}
inline void updMi(long long &a, long long b) {
  if (a > b) a = b;
}
const long long INF = 1e9 + 9;
long long getNear(long long n, vector<long long> &v, long long x) {
  long long l = 0, r = n;
  while (r - l > 1) {
    long long mid = (l + r) >> 1;
    if (v[mid] <= x)
      l = mid;
    else
      r = mid;
  }
  long long ans = abs(x - v[l]);
  if (r < n) ans = min(ans, abs(v[r] - x));
  return ans;
}
signed main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  long long n;
  cin >> n;
  vector<long long> cnt(n + 1, 0), used(n + 3, 0), cmove(n + 3, 0);
  for (long long i = (long long)(0); i < (long long)(n); ++i) {
    long long a;
    cin >> a;
    cnt[a]++;
  }
  long long mi = 0, mx = 0;
  for (long long i = (long long)(1); i < (long long)(n + 1); ++i) {
    if (cnt[i] == 1) {
      if (!used[i - 1])
        used[i - 1] = 1;
      else if (!used[i])
        used[i] = 1;
      else
        used[i + 1] = 1;
    } else if (cnt[i] == 2) {
      if (!used[i - 1])
        used[i - 1] = 1;
      else
        used[i + 1] = 1;
      used[i] = 1;
    } else if (cnt[i] > 2) {
      used[i - 1] = 1;
      used[i] = 1;
      used[i + 1] = 1;
    }
  }
  mx = accumulate(used.begin(), used.end(), 0);
  for (long long i = (long long)(1); i < (long long)(n + 1); ++i) {
    if (cnt[i]) {
      ++mi;
      i += 2;
    }
  }
  cout << mi << ' ' << mx << '\n';
  return 0;
}
