#include <bits/stdc++.h>
using namespace std;
int n;
int a[200009];
bool done1[200009];
bool done2[200009];
int mx() {
  int ret = 0;
  for (int i = 0; i < n; i++) {
    if (!done1[a[i] - 1]) {
      done1[a[i] - 1] = 1, ret++;
    } else if (!done1[a[i]]) {
      done1[a[i]] = 1, ret++;
    } else if (!done1[a[i] + 1]) {
      done1[a[i] + 1] = 1, ret++;
    }
  }
  return ret;
}
int mn() {
  int ret = 0;
  for (int i = 0; i < n; i++) {
    if (!done2[a[i] - 1]) {
      if (!done2[a[i]]) {
        if (!done2[a[i] + 1]) {
          done2[a[i] + 1] = 1, ret++;
        }
      }
    }
  }
  return ret;
}
int main() {
  ios_base::sync_with_stdio(0), cin.tie(0), cout.tie(0), cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> a[i];
  }
  sort(a, a + n);
  cout << mn() << " " << mx() << endl;
}
