#include <bits/stdc++.h>
using namespace std;
int N;
int X[200004];
const int INF = 1000000010;
int memo_min[200004][3];
int go_min(int n, int lastd) {
  if (n > N) return 0;
  int& res = memo_min[n][lastd + 1];
  if (res < 0) {
    res = INF;
    int cur_x = X[n];
    int prev_x = X[n - 1];
    if (lastd < 0)
      prev_x--;
    else if (lastd > 0)
      prev_x++;
    if (X[n] == X[n - 1]) {
      for (int d = (lastd), _b = (+1); d <= _b; ++d) {
        int x = cur_x + d;
        if (x >= prev_x) {
          int t = go_min(n + 1, d) + (x != prev_x);
          res = min(res, t);
        }
      }
    } else {
      for (int d = (-1), _b = (+1); d <= _b; ++d) {
        int x = cur_x + d;
        if (x >= prev_x) {
          int t = go_min(n + 1, d) + (x != prev_x);
          res = min(res, t);
        }
      }
    }
  }
  return res;
}
int memo_max[200004][3];
int go_max(int n, int lastd) {
  if (n > N) return 0;
  int& res = memo_max[n][lastd + 1];
  if (res < 0) {
    res = 0;
    int cur_x = X[n];
    int prev_x = X[n - 1];
    if (lastd < 0)
      prev_x--;
    else if (lastd > 0)
      prev_x++;
    if (X[n] == X[n - 1]) {
      for (int d = (lastd), _b = (+1); d <= _b; ++d) {
        int x = cur_x + d;
        if (x >= prev_x) {
          int t = go_max(n + 1, d) + (x != prev_x);
          res = max(res, t);
        }
      }
    } else {
      for (int d = (-1), _b = (+1); d <= _b; ++d) {
        int x = cur_x + d;
        if (x >= prev_x) {
          int t = go_max(n + 1, d) + (x != prev_x);
          res = max(res, t);
        }
      }
    }
  }
  return res;
}
int main(int argc, char* argv[]) {
  ios_base::sync_with_stdio(false);
  cin.tie(nullptr);
  cin >> N;
  for (int i = (1), _b = (N); i <= _b; ++i) cin >> X[i];
  X[0] = -INF;
  sort(X, X + N + 1);
  memset(memo_min, -1, sizeof(memo_min));
  int res_min = go_min(1, -1);
  memset(memo_max, -1, sizeof(memo_max));
  int res_max = go_max(1, -1);
  cout << res_min << ' ' << res_max << '\n';
  return 0;
}
