#include <bits/stdc++.h>
char _;
using namespace std;
void PRINT(int x, int y) {
  for (int i = y - 1; i >= 0; i--) {
    cout << ((0u == (x & (1 << i))) ? 0u : 1u);
  }
  cout << endl;
}
vector<string> vec_splitter(string s) {
  s += ',';
  vector<string> res;
  while (!s.empty()) {
    res.push_back(s.substr(0, s.find(',')));
    s = s.substr(s.find(',') + 1);
  }
  return res;
}
void debug_out(vector<string> __attribute__((unused)) args,
               __attribute__((unused)) int idx,
               __attribute__((unused)) int LINE_NUM) {
  cerr << endl;
}
template <typename Head, typename... Tail>
void debug_out(vector<string> args, int idx, int LINE_NUM, Head H, Tail... T) {
  if (idx > 0)
    cerr << ", ";
  else
    cerr << "Line(" << LINE_NUM << ") ";
  stringstream ss;
  ss << H;
  cerr << args[idx] << " = " << ss.str();
  debug_out(args, idx + 1, LINE_NUM, T...);
}
int cnt[200005][2] = {0};
bool o[200005][2] = {0};
int main() {
  cin.sync_with_stdio(0);
  cin.tie(0);
  int n;
  cin >> n;
  for (int x = 1; x <= n; x++) {
    int cur;
    cin >> cur;
    cnt[cur][0]++;
    cnt[cur][1]++;
  }
  for (int x = 1; x <= n; x++) {
    if (cnt[x][0] > 0) {
      if (!o[x - 1][0]) {
        o[x - 1][0] = true;
        cnt[x][0]--;
      }
      if (cnt[x][0] > 0 && !o[x][0]) {
        o[x][0] = true;
        cnt[x][0]--;
      }
      if (cnt[x][0] > 0) {
        cnt[x][0]--;
        o[x + 1][0] = true;
      }
    }
  }
  for (int x = 1; x <= n; x++) {
    if (cnt[x][1] > 0 && !o[x][1]) {
      if (o[x - 1][1]) {
        o[x - 1][1] = true;
      } else {
        o[x + 1][1] = true;
      }
    }
  }
  int mx = 0, mn = 0;
  for (int x = 0; x <= n + 1; x++) {
    if (o[x][0]) {
      mx++;
    }
    if (o[x][1]) {
      mn++;
    }
  }
  cout << mn << " " << mx << "\n";
  return 0;
}
