#include <bits/stdc++.h>
using namespace std;
const int MAXN = 1e6 + 5;
int a[MAXN];
void solve() {
  int n;
  cin >> n;
  for (int i = 0; i < n; i++) {
    int value;
    cin >> value;
    a[value]++;
  }
  int cnt = 0;
  for (int i = 1; i <= n; i++) {
    if (a[i]) {
      cnt++;
      i += 2;
    }
  }
  cout << cnt << " ";
  cnt = 0;
  for (int i = 1; i < n + 2; i++) {
    if (a[i]) {
      if (a[i - 1] == 0) {
        a[i]--;
        cnt++;
      }
      if (a[i]) {
        cnt++;
      }
      if (a[i] > 1) {
        a[i + 1]++;
      }
    }
  }
  cout << cnt << endl;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  int t = 1;
  while (t--) solve();
  cerr << "Time elapsed : " << clock() * 1000.0 / CLOCKS_PER_SEC << "ms"
       << '\n';
  return 0;
}
