#include <bits/stdc++.h>
using namespace std;
int n;
int cnt[200005];
int solve_min() {
  int res = 0;
  for (int i = 0; i <= n; i++) {
    if (!cnt[i]) continue;
    res++;
    i += 2;
  }
  return res;
}
int solve_max() {
  int lastend = -100;
  int sum;
  int res = 0;
  for (int i = 0; i <= n;) {
    if (!cnt[i]) {
      i++;
      continue;
    }
    sum = cnt[i] - 1;
    int j = i;
    while (j + 1 <= n && cnt[j + 1]) {
      j++;
      sum += cnt[j] - 1;
    }
    if (sum == 0) {
      res += j - i + 1;
      lastend = j;
      i = j + 1;
      continue;
    }
    if (sum == 1) {
      if (i - 1 > lastend) {
        res += j - i + 2;
        lastend = j;
        i = j + 1;
        continue;
      } else {
        res += j - i + 2;
        lastend = j + 1;
        i = j + 1;
        continue;
      }
    }
    if (i - 1 > lastend) res++;
    res += j - i + 2;
    lastend = j + 1;
    i = j + 1;
  }
  return res;
}
int main() {
  ios::sync_with_stdio(false);
  cin >> n;
  for (int i = 1; i <= n; i++) {
    int k;
    cin >> k;
    cnt[k]++;
  }
  cout << solve_min() << " " << solve_max() << endl;
}
