#include <bits/stdc++.h>
using namespace std;
long long ceildiv(long long one, long long two) {
  if (one % two == 0) {
    return one / two;
  } else {
    return one / two + 1;
  }
}
long long power(long long n, long long pow, long long m) {
  if (pow == 0) return 1;
  if (pow % 2 == 0) {
    long long x = power(n, pow / 2, m);
    return (x * x) % m;
  } else
    return (power(n, pow - 1, m) * n) % m;
}
long long gcd(long long a, long long b) {
  if (!b) return a;
  return gcd(b, a % b);
}
long long factorial(long long n, long long mod) {
  if (n > 1)
    return (n * factorial(n - 1, mod)) % mod;
  else
    return 1;
}
long long lcm(long long a, long long b) { return (a * b) / gcd(a, b); }
vector<long long> read(long long n) {
  vector<long long> a;
  for (long long i = 0; i < n; i++) {
    long long x;
    cin >> x;
    a.push_back(x);
  }
  return a;
}
vector<vector<pair<long long, long long>>> adj;
void init(long long n) {
  for (long long i = 0; i <= n; i++) {
    vector<pair<long long, long long>> a;
    adj.push_back(a);
  }
}
void solve() {
  long long n;
  cin >> n;
  vector<long long> a = read(n);
  sort(a.begin(), a.end());
  vector<long long> x(n + 2);
  for (long long i = 0; i < n; i++) {
    if (x[a[i] - 1] == 1) {
      if (x[a[i]] == 1) {
        x[a[i] + 1] = 1;
      } else {
        x[a[i]] = 1;
      }
    } else {
      x[a[i] - 1] = 1;
    }
  }
  long long mx = 0, mn = 0;
  for (auto k : x) {
    if (k == 1) {
      mx++;
    }
  }
  x.assign(x.size(), 0);
  for (long long i = 0; i < n; i++) {
    if (x[a[i] - 1] != 1) {
      if (x[a[i]] != 1) {
        x[a[i] + 1] = 1;
      } else {
        x[a[i]] = 1;
      }
    } else {
      x[a[i] - 1] = 1;
    }
  }
  for (auto k : x) {
    if (k == 1) {
      mn++;
    }
  }
  cout << mn << " " << mx << '\n';
}
int32_t main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  ;
  long long t = 1;
  while (t--) {
    solve();
  }
}
