#include <bits/stdc++.h>
using namespace std;
int n;
int ara[200100];
bool used[200100];
int get_lo() {
  int ans = 0;
  memset(used, 0, sizeof(used));
  for (int i = 0; i < n; i++) {
    int x = ara[i];
    if (used[x - 1] || used[x] || used[x + 1]) continue;
    ans++;
    used[x + 1] = true;
  }
  return ans;
}
int get_hi() {
  int ans = 0;
  memset(used, 0, sizeof(used));
  for (int i = 0; i < n; i++) {
    int x = ara[i];
    if (used[x - 1] && used[x] && used[x + 1]) continue;
    ans++;
    if (!used[x - 1])
      used[x - 1] = true;
    else if (!used[x])
      used[x] = true;
    else
      used[x + 1] = true;
  }
  return ans;
}
int main() {
  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> ara[i];
  }
  sort(ara, ara + n);
  cout << get_lo() << " " << get_hi() << endl;
  return 0;
}
