#include <bits/stdc++.h>
using namespace std;
const long long int M = 998244353;
const long long int INF = 9e18 + 2e17;
const int inf = 2e9;
const long long int N = 2e5 + 5;
const double eps = 1e-10;
const double PI = 3.14159265;
int n, a[N], b[N], c[N], d[N];
void solve() {
  cin >> n;
  int x;
  for (int i = 0; i < n; i++) {
    cin >> x;
    a[x]++;
    c[x]++;
  }
  for (int i = 1; i <= n; i++) {
    if (a[i] && b[i - 1] == 0) {
      b[i - 1] += 1;
      a[i]--;
    }
    if (a[i] && b[i] == 0) {
      a[i]--;
      b[i] += 1;
    }
    if (a[i]) {
      b[i + 1] += a[i];
      a[i] = 0;
    }
  }
  int mx = 0, mn = 0;
  for (int i = 0; i <= n + 1; i++) {
    if (b[i]) mx++;
  }
  for (int i = 1; i <= n; i++) {
    if (!c[i]) continue;
    mn++;
    i += 2;
  }
  cout << mn << ' ' << mx;
  return;
}
signed main() {
  ios::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  solve();
  return 0;
}
