#include <bits/stdc++.h>
using namespace std;
void solve() {
  long long n;
  cin >> n;
  vector<long long> a(n);
  long long maxi = -1;
  for (int i = 0; i < n; i++) {
    cin >> a[i];
    maxi = max(a[i], maxi);
  }
  sort(a.begin(), a.begin() + n);
  long long mx = 0;
  vector<bool> v(maxi + 2, 0);
  vector<long long> pref(maxi + 1, 0);
  for (int i = 0; i < n; i++) {
    pref[a[i]]++;
    if (v[a[i] - 1] == 0) {
      v[a[i] - 1] = 1;
      mx++;
    } else if (v[a[i]] == 0) {
      v[a[i]] = 1;
      mx++;
    } else if (v[a[i] + 1] == 0) {
      v[a[i] + 1] = 1;
      mx++;
    }
  }
  long long ans = 0;
  for (int i = 1; i <= maxi;) {
    if (pref[i] == 0)
      i++;
    else {
      ans++;
      i += 3;
    }
  }
  cout << ans << " " << mx;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int t = 1;
  while (t--) {
    solve();
  }
  return 0;
}
