#include <bits/stdc++.h>
using namespace std;
int main(void) {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  long long n;
  cin >> n;
  vector<long long> x(n + 1);
  for (long long i = 1; i <= n; i++) cin >> x[i];
  sort(x.begin() + 1, x.end());
  long long ans_max = 0, ans_min = 0;
  map<long long, long long> mp1;
  map<long long, long long> mp2;
  for (long long i = 1; i <= n;) {
    long long j = i, count = 0;
    while (j <= n && x[j] == x[i]) {
      count++;
      j++;
    }
    if (count >= 3) {
      if (mp1.find(x[i] - 1) == mp1.end()) {
        mp1[x[i] - 1] = 1;
        ans_max++;
      }
      if (mp1.find(x[i]) == mp1.end()) {
        mp1[x[i]] = 1;
        ans_max++;
      }
      mp1[x[i] + 1] = 1;
      ans_max++;
    } else if (count == 2) {
      if (mp1.find(x[i] - 1) == mp1.end()) {
        mp1[x[i] - 1] = 1;
        ans_max++;
        if (mp1.find(x[i]) == mp1.end()) {
          mp1[x[i]] = 1;
          ans_max++;
        } else {
          mp1[x[i] + 1] = 1;
          ans_max++;
        }
      } else if (mp1.find(x[i]) == mp1.end()) {
        mp1[x[i]] = 1;
        ans_max++;
        mp1[x[i] + 1] = 1;
        ans_max++;
      } else {
        mp1[x[i] + 1] = 1;
        ans_max++;
      }
    } else if (count == 1) {
      if (mp1.find(x[i] - 1) == mp1.end()) {
        mp1[x[i] - 1] = 1;
        ans_max++;
      } else if (mp1.find(x[i]) == mp1.end()) {
        mp1[x[i]] = 1;
        ans_max++;
      } else {
        mp1[x[i] + 1] = 1;
        ans_max++;
      }
    }
    i = j;
  }
  for (long long i = 1; i <= n;) {
    long long j = i, count = 0;
    while (j <= n && x[j] == x[i]) {
      count++;
      j++;
    }
    if (mp2.find(x[i] - 1) != mp2.end())
      mp2[x[i] - 1] = 1;
    else if (mp2.find(x[i]) != mp2.end())
      mp2[x[i]] = 1;
    else {
      ans_min++;
      mp2[x[i] + 1] = 1;
    }
    i = j;
  }
  cout << ans_min << " " << ans_max;
  return 0;
}
