#include <bits/stdc++.h>
using namespace std;
void solve() {
  int n;
  cin >> n;
  int a[n], sum = 0;
  set<int> s;
  map<int, int> m;
  for (int i = 0; i < (n); ++i) {
    cin >> a[i];
    if (m[a[i]] < 3) m[a[i]]++;
    s.insert(a[i]);
  }
  vector<int> v;
  for (auto i : s) {
    v.push_back(i);
  }
  for (int i = 0; i < ((int)v.size()); ++i) {
    if (i + 2 < (int)v.size() && i + 1 < (int)v.size() &&
        v[i] == v[i + 1] - 1 && v[i + 2] != v[i + 1] + 1) {
      sum += 1;
      i++;
    } else if (i + 2 < (int)v.size() && i + 1 < (int)v.size() &&
               v[i] == v[i + 1] - 1 && v[i + 2] == v[i + 1] + 1) {
      sum += 1;
      i += 2;
    } else if (i + 1 < (int)v.size() && v[i] == v[i + 1] - 1) {
      sum += 1;
      i++;
    } else if (i + 1 < (int)v.size() && v[i] == v[i + 1] - 2) {
      sum += 1;
      i++;
    } else
      sum++;
  }
  int sum2 = 0;
  for (int i = 0; i < ((int)v.size()); ++i) {
    if (m[v[i]] == 1) {
      if (m[v[i] - 1] == 0) {
        m[v[i] - 1]++;
        m[v[i]]--;
      }
    } else if (m[v[i]] == 2) {
      if (m[v[i] - 1] == 0) {
        m[v[i]]--;
        m[v[i] - 1]++;
      } else if (m[v[i] + 1] == 0) {
        m[v[i] + 1]++;
        m[v[i]]--;
      } else {
        m[v[i] + 1]++;
        m[v[i]]--;
      }
    } else if (m[v[i]] >= 3) {
      m[v[i] + 1]++;
      m[v[i] - 1]++;
      m[v[i]] -= 2;
    }
  }
  sum2 = 0;
  for (auto i : m)
    if (i.second != 0) sum2++;
  cout << sum << " " << sum2;
}
int main() {
  std::ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  int t;
  t = 1;
  while (t--) {
    solve();
  }
  return 0;
}
