#include <bits/stdc++.h>
using namespace std;
void solve() {
  int n;
  cin >> n;
  int arr[n];
  for (int i = 0; i < n; i++) cin >> arr[i];
  sort(arr, arr + n);
  int mi = 0, ma = 0;
  int current = 0;
  for (int i = 0; i < n; i++) {
    if (i == 0) {
      current = arr[i] + 1;
      mi++;
    } else if (abs(current - arr[i]) > 1) {
      mi++;
      current = arr[i] + 1;
    }
  }
  set<int> s;
  for (int i = 0; i < n; i++) {
    if (s.find(arr[i] - 1) == s.end())
      s.insert(arr[i] - 1);
    else if (s.find(arr[i]) == s.end())
      s.insert(arr[i]);
    else if (s.find(arr[i] + 1) == s.end())
      s.insert(arr[i] + 1);
  }
  ma = s.size();
  cout << mi << " " << ma << endl;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  long long int t;
  t = 1;
  while (t--) solve();
  return 0;
}
