#include <bits/stdc++.h>
using namespace std;
int n;
int arr[200005];
long long dp[200005];
long long fun(int pos) {
  if (pos > (n + 1)) {
    return 0;
  }
  if (dp[pos] != -1) return dp[pos];
  long long res = 1e8;
  if (arr[pos] > 0) {
    res = min(res, 1 + fun(pos + 2));
    res = min(res, 1 + fun(pos + 3));
    res = min(res, 1 + fun(pos + 1));
  } else
    res = min(res, fun(pos + 1));
  return dp[pos] = res;
}
int main() {
  cin >> n;
  for (int i = 0; i < n; i++) {
    int x;
    cin >> x;
    arr[x]++;
  }
  memset(dp, -1, sizeof dp);
  cout << fun(0) << " ";
  for (int i = n; i > 0; i--) {
    if (arr[i] > 0) {
      if (arr[i + 1] == 0) {
        arr[i + 1]++;
        arr[i]--;
      }
      if (arr[i] > 1) {
        arr[i - 1]++;
        arr[i]--;
      }
    }
  }
  int cnt = 0;
  for (int i = 0; i <= (n + 1); i++) {
    if (arr[i] > 0) {
      cnt++;
    }
  }
  cout << cnt << endl;
  return 0;
}
