#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using pii = pair<int, int>;
using pll = pair<long long, long long>;
using pcc = pair<char, char>;
using pdd = pair<double, double>;
using vi = vector<int>;
using vs = vector<string>;
using vll = vector<ll>;
using vpii = vector<pii>;
using vc = vector<char>;
using vd = vector<double>;
int chk[200100], ck[200100];
int main(int argc, char* argv[]) {
  int n, ara[200100], x, i, mn = 0, mx = 0;
  scanf("%d%*c", &(n));
  for (i = 0; i < n; i++) {
    scanf("%d%*c", &(ara[i]));
    chk[ara[i]]++;
    ck[ara[i]] = chk[ara[i]];
  }
  for (i = 1; i <= n + 1; i++) {
    if (ck[i - 1]) {
      ck[i - 1] = ck[i + 1] = ck[i] = 0;
      mn++;
    }
  }
  for (i = 1; i <= n + 1; i++) {
    if (chk[i] == 1) {
      if (chk[i - 1] == 0) chk[i] = 0, chk[i - 1] = 1;
      mx++;
    } else if (chk[i] == 2) {
      if (chk[i - 1] == 0) {
        mx += 2;
      } else if (chk[i + 1] == 0) {
        mx++;
        chk[i + 1]++;
      } else {
        mx++;
        chk[i + 1]++;
      }
    } else if (chk[i] >= 3) {
      if (chk[i - 1] == 0 && chk[i + 1] == 0) {
        mx += 2;
      } else if (chk[i - 1] == 0) {
        mx += 2;
      } else if (chk[i + 1] == 0) {
        mx++;
      } else
        mx++;
      chk[i - 1]++;
      chk[i + 1]++;
    }
  }
  printf("%d", (mn));
  printf(" ");
  printf("%d", (mx));
  printf("\n");
  return 0;
}
