#include <bits/stdc++.h>
using namespace std;
const int N = 1e6 + 5;
const int MOD = 1e9 + 7;
int n, m, x, dp[N], cnt[N];
vector<int> nv;
set<int> s;
int minsolve(int pos) {
  if (pos >= m) return 0;
  if (dp[pos] != -1) return dp[pos];
  int ans = INT_MAX;
  if (pos < n - 2 && nv[pos + 1] == nv[pos] + 1 && nv[pos + 2] == nv[pos] + 2)
    ans = min(ans, 1 + minsolve(pos + 3));
  else if (pos < n - 1 &&
           (nv[pos + 1] == nv[pos] + 1 || nv[pos + 1] == nv[pos] + 2))
    ans = min(ans, 1 + minsolve(pos + 2));
  else
    ans = min(ans, 1 + minsolve(pos + 1));
  return dp[pos] = ans;
}
int maxsolve1() {
  map<int, int> make_pair;
  for (int i = 0; i < m; i++) {
    if (make_pair[nv[i] - 1] == 0) {
      make_pair[nv[i] - 1] = 1;
      cnt[nv[i]]--;
    }
    if (make_pair[nv[i]] == 0 && cnt[nv[i]]) {
      make_pair[nv[i]] = 1;
      cnt[nv[i]]--;
    }
    make_pair[nv[i] + 1] = cnt[nv[i]] > 0 ? 1 : 0;
  }
  int ans = 0;
  for (auto it = make_pair.begin(); it != make_pair.end(); it++)
    if (it->second == 1) ans++;
  return ans;
}
int maxsolve2() {
  map<int, int> make_pair;
  for (int i = 0; i < m; i++) make_pair[nv[i]] = 1;
  for (int i = m - 1; i >= 0; i--) {
    if (cnt[nv[i]] == 1) {
      if (make_pair[nv[i] + 1] == 0) {
        make_pair[nv[i] + 1] = 1;
        make_pair[nv[i]] = 0;
      }
    } else if (cnt[nv[i]] == 2) {
      if (make_pair[nv[i] + 1] == 0) {
        make_pair[nv[i] + 1] = 1;
      } else if (make_pair[nv[i] - 1] == 0) {
        make_pair[nv[i] - 1] = 1;
      }
    } else {
      if (make_pair[nv[i] + 1] == 0) {
        make_pair[nv[i] + 1] = 1;
      }
      if (make_pair[nv[i] - 1] == 0) {
        make_pair[nv[i] - 1] = 1;
      }
    }
  }
  int ans = 0;
  for (auto it = make_pair.begin(); it != make_pair.end(); it++)
    if (it->second == 1) ans++;
  return ans;
}
int32_t main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  {
    memset(dp, -1, sizeof(dp));
    cin >> n;
    for (int i = 0; i < n; i++) {
      cin >> x;
      s.insert(x);
      cnt[x]++;
    }
    for (auto it : s) nv.push_back(it);
    m = nv.size();
    cout << minsolve(0) << " " << maxsolve1() << "\n";
  }
}
