#include <bits/stdc++.h>
using namespace std;
int v[(int)(2e5 + 5)], fr[(int)(2e5 + 5)], a[(int)(2e5 + 5)];
bool us[(int)(2e5 + 5)];
int main() {
  int n, i, j, nr = 0, x, tot, k = 0, maxi = 0;
  cin >> n;
  for (i = 1; i <= n; i++) {
    cin >> v[i];
    if (v[i] > maxi) maxi = v[i];
    fr[v[i]]++;
  }
  for (i = 1; i <= maxi; i++)
    if (fr[i]) a[++nr] = i;
  int cnr = nr;
  a[0] = -100;
  for (i = 1; i <= nr; i++) {
    if (a[i] == a[i - 1] + 1 && a[i] == a[i + 1] - 1) {
      cnr -= 2;
      a[i] = -1;
      a[i + 1] = -1;
    } else if (a[i] == a[i - 1] + 1) {
      cnr--;
      a[i] = -1;
    } else if (a[i] == a[i - 1] + 2) {
      cnr--;
      a[i] = -1;
    }
  }
  cout << cnr << " ";
  for (i = 1; i <= maxi; i++)
    if (fr[i]) {
      if (fr[i] >= 3) us[i] = 1, us[i - 1] = 1, us[i + 1] = 1;
      if (fr[i] == 2) {
        if (!us[i])
          us[i] = 1;
        else
          us[i + 1] = 1;
        if (!us[i - 1])
          us[i - 1] = 1;
        else
          us[i + 1] = 1;
      }
      if (fr[i] == 1) {
        if (!us[i - 1])
          us[i - 1] = 1;
        else if (!us[i])
          us[i] = 1;
        else
          us[i + 1] = 1;
      }
    }
  cnr = 0;
  for (i = 0; i <= maxi + 1; i++)
    if (us[i]) cnr++;
  cout << cnr;
  return 0;
}
