#include <bits/stdc++.h>
using namespace std;
signed main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  int n, arr[200000];
  cin >> n;
  for (int i = 0; i < n; i++) cin >> arr[i];
  sort(arr, arr + n);
  int mnc = 0;
  for (int i = 0; i < n;) {
    mnc++;
    int r = i;
    while (r < n && arr[r] - arr[i] <= 2) r++;
    i = r;
  }
  set<int> s;
  for (int i = 0; i < n; i++) {
    if (!s.count(arr[i] - 1))
      s.insert(arr[i] - 1);
    else if (!s.count(arr[i]))
      s.insert(arr[i]);
    else
      s.insert(arr[i] + 1);
  }
  cout << mnc << ' ' << s.size() << '\n';
  return 0;
}
