#include <bits/stdc++.h>
using namespace std;
const long long MOD = 119 << 23 | 1;
long long gcd(long long x, long long y) {
  if (!y) return x;
  return gcd(y, x % y);
}
long long inv(long long x) {
  long long r = 1ll, t = x, k = MOD - 2ll;
  while (k) {
    if (k & 1ll) r = (long long)r * t % MOD;
    t = (long long)t * t % MOD;
    k >>= 1;
  }
  return r;
}
int n, x;
vector<int> pos;
void readIN() {
  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> x;
    pos.push_back(x);
  }
  sort(pos.begin(), pos.end());
}
void solve() {
  vector<int> przedzialy, pocz, kon, multi;
  przedzialy.push_back(1);
  pocz.push_back(pos[0]);
  kon.push_back(pos[0]);
  multi.push_back(0);
  for (int i = 1; i < n; i++) {
    if (pos[i] == pos[i - 1] + 1) {
      przedzialy.back()++;
      kon.back() = pos[i];
    } else if (pos[i] > pos[i - 1] + 1) {
      przedzialy.push_back(1);
      pocz.push_back(pos[i]);
      kon.push_back(pos[i]);
      multi.push_back(0);
    } else if (pos[i] == pos[i - 1]) {
      multi.back()++;
    }
  }
  int mini = 0;
  for (auto el : przedzialy) {
    mini += ((el + 2) / 3);
  }
  int maksi = 0;
  bool occupied[1000000];
  for (int i = 0; i < n + 10; i++) occupied[i] = false;
  for (int i = 0; i < n; i++) {
    if (occupied[pos[i] - 1] == false) {
      occupied[pos[i] - 1] = true;
      maksi++;
    } else if (occupied[pos[i]] == false) {
      occupied[pos[i]] = true;
      maksi++;
    } else if (occupied[pos[i] + 1] == false) {
      occupied[pos[i] + 1] = true;
      maksi++;
    }
  }
  for (int i = 0; i < n + 10; i++) occupied[i] = false;
  int mini2 = 0;
  for (int i = 0; i < n; i++) {
    if (occupied[pos[i] - 1] || occupied[pos[i]] || occupied[pos[i] + 1]) {
    } else {
      occupied[pos[i] + 1] = true;
      mini2++;
    }
  }
  cout << mini2 << ' ' << maksi << endl;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie();
  readIN();
  solve();
  return 0;
}
