#include <bits/stdc++.h>
using namespace std;
const long long inf = 1e9;
int32_t main() {
  cin.tie(0);
  ios::sync_with_stdio(0);
  long long n;
  cin >> n;
  vector<long long> a(n + 1), used(n + 2, 0);
  for (long long i = 1; i <= n; i++) cin >> a[i];
  sort(a.begin(), a.end());
  long long mx = 0;
  for (long long i = 1; i <= n; i++) {
    for (long long j = -1; j <= 1; j++) {
      if (used[a[i] + j] == 0) {
        mx++;
        used[a[i] + j] = 1;
        break;
      }
    }
  }
  long long mn = 0;
  long long maior = -1;
  for (long long i = 1; i <= n; i++) {
    if (a[i] - 1 > maior) {
      mn++;
      maior = a[i] + 1;
    }
  }
  cout << mn << " " << mx << endl;
}
