#include <bits/stdc++.h>
using namespace std;
template <class T>
istream& operator>>(istream& is, vector<T>& vec) {
  for (int i = 0; i < (int)vec.size(); ++i) is >> vec[i];
  return is;
}
template <class T>
ostream& operator<<(ostream& os, vector<T>& vec) {
  for (int i = 0; i < (int)vec.size(); ++i) os << vec[i] << " ";
  return os;
}
template <class T>
istream& operator>>(istream& is, pair<T, T>& a) {
  is >> a.first >> a.second;
  return is;
}
const double pi = acos(-1.0);
const long long mod = 1e9 + 7;
const int inf = 2e9;
const long long INF = 1e18;
const int maxlen = (int)2e5;
const double eps = 1e-10;
int main() {
  cin.sync_with_stdio(false);
  cout.sync_with_stdio(false);
  cin.tie(NULL);
  int n;
  cin >> n;
  map<int, int> m1, m2;
  for (int i = 0; i < n; ++i) {
    int x;
    cin >> x;
    m1[x]++;
    m2[x]++;
  }
  int minans = 0, maxans = 0;
  map<int, int> mn, mx, t;
  for (auto& p : m2) {
    if (p.second) {
      if (!t[p.first]) {
        m2[p.first + 1] = 1;
        m2[p.first] = 0;
        m2[p.first + 2] = 0;
        t[p.first + 1] = 1;
        continue;
      }
    }
  }
  for (auto p : m2) {
    minans += p.second > 0;
  }
  for (auto& p : m1) {
    if (p.second) {
      if (!m1[p.first - 1]) {
        m1[p.first - 1]++;
        p.second--;
      }
      if (p.second > 1) {
        m1[p.first + 1]++;
        p.second--;
      }
    }
  }
  for (auto p : m1) {
    maxans += p.second > 0;
  }
  cout << minans << " " << maxans;
}
