#include <bits/stdc++.h>
const int MAX_N = 2 * 100000;
using namespace std;
int n;
int v[MAX_N + 5], freq[MAX_N + 5], dif[MAX_N + 5];
int main() {
  int n, minim = 0, maxim = 0;
  cin >> n;
  for (int i = 1; i <= n; i++) {
    cin >> v[i];
    freq[v[i]]++;
  }
  for (int i = 1; i <= n; i++)
    if (freq[i] > 0) {
      if (freq[i] == 1) {
        if (dif[i - 1] == 0)
          dif[i - 1] = 1;
        else if (dif[i] == 0)
          dif[i] = 1;
        else
          dif[i + 1] = 1;
        maxim++;
      } else if (freq[i] == 2) {
        int f2 = 0;
        if (dif[i - 1] == 0) dif[i - 1] = 1, f2++, maxim++;
        if (dif[i] == 0) dif[i] = 1, f2++, maxim++;
        if (f2 < 2) dif[i + 1] = 1, maxim++;
      } else {
        if (dif[i - 1] == 0) dif[i - 1] = 1, maxim++;
        if (dif[i] == 0) dif[i] = 1, maxim++;
        dif[i + 1] = 1, maxim++;
      }
    }
  int i = 1;
  while (i <= n) {
    if (freq[i] == 0)
      i++;
    else
      minim++, i += 3;
  }
  cout << minim << ' ' << maxim << '\n';
  return 0;
}
