#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  long long n;
  cin >> n;
  long long ar[n];
  map<long long, long long> m2;
  set<long long> se;
  for (long long i = 0; i < n; i++) {
    cin >> ar[i];
    se.insert(ar[i]);
  }
  sort(ar, ar + n);
  long long c1 = 0;
  for (long long i = 0; i < n; i++) {
    long long first = 0;
    if (m2[ar[i] - 1] == 0) {
      c1++;
      m2[ar[i] - 1]++;
    } else if (m2[ar[i]] == 0) {
      c1++;
      m2[ar[i]]++;
    } else if (m2[ar[i] + 1] == 0) {
      c1++;
      m2[ar[i] + 1]++;
    }
  }
  long long c2 = 0;
  vector<long long> v;
  for (auto it = se.begin(); it != se.end(); it++) v.push_back(*it);
  long long a = v.size();
  long long br[a];
  memset(br, 0, sizeof(br));
  for (long long i = 0; i < a;) {
    if (i < a - 2 and v[i] == v[i + 2] - 2 and v[i] == v[i + 1] - 1 and
        br[i] == 0 and br[i + 1] == 0 and br[i + 2] == 0) {
      c2++;
      br[i] = 1;
      br[i + 1] = 1;
      br[i + 2] = 1;
      i = i + 3;
    } else if (i < a - 1 and br[i] == 0 and br[i + 1] == 0 and
               (v[i] == v[i + 1] - 1 or v[i] == v[i + 1] - 2)) {
      c2++;
      br[i] = 1;
      br[i + 1] = 1;
      i = i + 2;
    } else {
      c2++;
      i++;
    }
  }
  cout << c2 << " " << c1;
  return 0;
}
