#include <bits/stdc++.h>
const int N = 2e5 + 100;
const double EPS = 1e-9;
using namespace std;
void dbg() { cout << "\n"; }
template <typename T, typename... A>
void dbg(T a, A... x) {
  cout << a << ' ';
  dbg(x...);
}
int n, a[N], mp[N], minn, maxn;
void solve1() {
  for (int i = 0; i <= n + 1; i++) mp[i] = 0;
  for (int i = 1; i <= n; i++) mp[a[i]]++;
  for (int i = 1; i <= n; i++) {
    if (mp[a[i] - 1] == 0)
      mp[a[i] - 1]++, mp[a[i]]--;
    else if (mp[a[i]] == 1)
      continue;
    else
      mp[a[i] + 1]++, mp[a[i]]--;
  }
  for (int i = 0; i <= n + 1; i++)
    if (mp[i]) maxn++;
}
void solve2() {
  for (int i = 0; i <= n + 1; i++) mp[i] = 0;
  for (int i = 1; i <= n; i++) mp[a[i]] = 1;
  for (int i = 0; i <= n + 1; i++)
    if (mp[i] && mp[i + 1] && mp[i + 2]) {
      minn++;
      i += 2;
    } else if (mp[i] && mp[i + 1]) {
      minn++;
      i += 1;
    } else if (mp[i] && mp[i + 2]) {
      minn++;
      i += 2;
    } else if (mp[i]) {
      minn++;
    }
}
int main() {
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) scanf("%d", &a[i]);
  sort(a + 1, a + 1 + n);
  solve1();
  solve2();
  printf("%d %d\n", minn, maxn);
  return 0;
}
