#include <bits/stdc++.h>
using std::cin;
using std::cout;
using std::endl;
using std::pair;
using std::string;
using std::vector;
using vi = vector<int>;
using pii = pair<int, int>;
using vii = vector<pii>;
using ll = long long;
int solve();
int main(int argc, char* argv[]) {
  ::std::ios::sync_with_stdio(false);
  ::std::cin.tie(0);
  ::std::cout.tie(0);
  int t = 1;
  for (int i = 1; i <= t; ++i) {
    solve();
  }
}
int solve() {
  int n;
  cin >> n;
  vector<int> f(4 + n);
  for (int i = 1; i <= n; ++i) {
    int x;
    cin >> x;
    ++f[x];
  }
  int min_x = 0;
  int max_x = 0;
  for (int i = 1; i <= n; ++i) {
    if (f[i] > 0) {
      ++min_x;
      i += 2;
    }
  }
  vector<int> gost(4 + n);
  int z = 0;
  for (int i = 1; i <= n; ++i) {
    if (f[i] > 0 && f[i - 1] == 0 && gost[i - 1] == 0) {
      gost[i - 1]++;
      f[i]--;
    }
    if (f[i] > 0 && f[i] + gost[i] > 1) {
      f[i]--;
      gost[i + 1]++;
    }
  }
  for (int i = 0; i <= n + 1; i++) {
    if (f[i] + gost[i] > 0) {
      ++max_x;
    }
  }
  cout << min_x << ' ' << max_x << endl;
  return 0;
}
