#include <bits/stdc++.h>
using namespace std;
int mn[200005], mx[200005];
int main() {
  int n, x, mnn = 0, mxx = 0;
  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> x;
    mn[x]++;
    mx[x]++;
  }
  for (int i = 1; i <= 200000; i++) {
    if (mn[i] != 0) {
      if (mn[i + 1] != 0 && mn[i + 2] != 0) {
        mn[i] = 0;
        mn[i + 2] = 0;
        i += 2;
      } else if (mn[i + 1] != 0) {
        mn[i] = 0;
        i++;
      } else if (mn[i + 1] == 0 && mn[i + 2] != 0) {
        mn[i + 2] = 0;
        i += 2;
      }
    }
  }
  for (int i = 1; i <= 200000; i++) {
    if (mn[i] != 0) mnn++;
  }
  for (int i = 1; i <= 200000; i++) {
    if (mx[i] != 0) {
      if (mx[i - 1] == 0) {
        mx[i - 1] = 1;
        mx[i]--;
        if (mx[i] > 1) {
          mx[i + 1]++;
        }
      } else {
        if (mx[i] > 1) {
          mx[i + 1] += 1;
        }
      }
    }
  }
  for (int i = 0; i <= 200001; i++) {
    if (mx[i] != 0) mxx++;
  }
  cout << mnn << " " << mxx << endl;
}
