#include <bits/stdc++.h>
using namespace std;
const long long maxn = 200010;
const long long mod = 1000000007;
const long long inf = 2000000000;
const long long inf64 = inf * inf;
int arr[maxn];
signed main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  int n, val, min_cnt = 0, max_cnt = 0;
  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> val;
    arr[val]++;
  }
  for (int i = 1; i <= maxn; i++)
    if (arr[i]) min_cnt++, i += 2;
  for (int i = 1; i < maxn - 1; i++) {
    if (arr[i] and arr[i - 1] == 0) arr[i - 1] = 1, arr[i]--;
    if (arr[i] > 1) arr[i]--, arr[i + 1]++;
  }
  for (int i = 0; i < maxn; i++)
    if (arr[i]) max_cnt++;
  cout << min_cnt << " " << max_cnt << "\n";
  return 0;
}
