#include <bits/stdc++.h>
using namespace std;
const int kMaxN = 200001;
int a[kMaxN], b[kMaxN];
int n;
int FindMin() {
  int c = 0;
  for (int i = 1; i <= n; i++) {
    if (b[i - 1] >= a[i] - 1) {
      b[i] = b[i - 1];
    } else {
      c++;
      b[i] = a[i] + 1;
    }
  }
  return c;
}
int FindMax() {
  int c = 0;
  for (int i = 1; i <= n; i++) {
    if (b[i - 1] <= a[i]) {
      c++;
      b[i] = max(b[i - 1] + 1, a[i] - 1);
    } else {
      b[i] = b[i - 1];
    }
  }
  return c;
}
int main() {
  cin >> n;
  for (int i = 1; i <= n; i++) {
    cin >> a[i];
  }
  a[0] = b[0] = -1;
  sort(a + 1, a + 1 + n);
  cout << FindMin() << " " << FindMax() << endl;
  return 0;
}
