#include <bits/stdc++.h>
using namespace std;
long long a[200001];
long long n;
long long pos[200009];
long long getMin() {
  long long c = 0;
  for (long long i = 0; i < n; i++) {
    if (!(pos[a[i] + 1] == 1 || pos[a[i]] == 1 || pos[a[i] - 1] == 1)) {
      pos[a[i] + 1] = 1;
      c++;
    }
  }
  return c;
}
long long getMax() {
  long long c = 0;
  for (long long i = 0; i < n; i++) {
    if (pos[a[i] - 1] == 0) {
      pos[a[i] - 1] = 1;
      c++;
    } else if (pos[a[i]] == 0) {
      pos[a[i]] = 1;
      c++;
    } else if (pos[a[i] + 1] == 0) {
      pos[a[i] + 1] = 1;
      c++;
    }
  }
  return c;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int t;
  t = 1;
  while (t--) {
    long long i;
    cin >> n;
    for (i = 0; i < n; i++) cin >> a[i];
    sort(a, a + n);
    memset(pos, 0, sizeof(pos));
    long long ma = getMax();
    memset(pos, 0, sizeof(pos));
    long long mi = getMin();
    cout << mi << " " << ma << '\n';
  }
  return 0;
}
