#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  int a[n];
  vector<int> v;
  for (int i = 0; i < n; i++) cin >> a[i];
  sort(a, a + n);
  for (int i = 0; i < n; i++) {
    if (v.size() == 0)
      v.push_back(a[i]);
    else {
      if (v.back() != a[i]) v.push_back(a[i]);
    }
  }
  v.push_back(0);
  sort(v.begin(), v.end());
  int dp[v.size()];
  dp[0] = 0;
  dp[1] = 1;
  for (int i = 2; i < v.size(); i++) {
    if (v[i] - v[i - 1] <= 2) {
      dp[i] = min(dp[i - 2] + 1, dp[i - 1] + 1);
      if (i >= 3 && (v[i] - v[i - 1] == v[i - 1] - v[i - 2]) &&
          (v[i] - v[i - 1] == 1)) {
        dp[i] = min(dp[i], dp[i - 3] + 1);
      }
    } else
      dp[i] = dp[i - 1] + 1;
  }
  cout << dp[v.size() - 1] << " ";
  unordered_map<int, int> mp;
  int cnt = 0;
  for (int i = 0; i < n; i++) {
    if (mp[a[i] - 1] == 0) {
      mp[a[i] - 1] = 1;
      cnt++;
    } else if (mp[a[i]] == 0) {
      mp[a[i]] = 1;
      cnt++;
    } else if (mp[a[i] + 1] == 0) {
      mp[a[i] + 1] = 1;
      cnt++;
    }
  }
  cout << cnt << endl;
  return 0;
}
