#include <bits/stdc++.h>
using namespace std;
const int inf = INT_MAX;
const long long int INF = LLONG_MAX;
const long long int mod = 1e9 + 7;
int main() {
  ios_base::sync_with_stdio(false), cin.tie(NULL), cout.tie(NULL);
  long long int n;
  cin >> n;
  vector<long long int> x(n);
  set<long long int> temp;
  for (long long int i = 0; i <= n - 1; i++) {
    cin >> x[i];
    temp.insert(x[i]);
  }
  sort(x.begin(), x.end());
  vector<bool> vis(n + 2, false);
  long long int index = 0;
  while (index < n) {
    long long int curr = x[index];
    long long int count = 0;
    while (index < n && curr == x[index]) {
      index++;
      count++;
    }
    if (count == 1 && !vis[curr - 1]) {
      vis[curr - 1] = true;
    } else if (count == 1 && vis[curr - 1]) {
      if (vis[curr])
        vis[curr + 1] = true;
      else
        vis[curr] = true;
    } else if (count == 2 && !vis[curr - 1]) {
      vis[curr - 1] = true;
      if (vis[curr])
        vis[curr + 1] = true;
      else
        vis[curr] = true;
    } else if (count == 2 && vis[curr - 1]) {
      vis[curr] = true;
      vis[curr + 1] = true;
    } else {
      vis[curr - 1] = true;
      vis[curr] = true;
      vis[curr + 1] = true;
    }
  }
  long long int maxi = 0;
  for (long long int i = 0; i <= n + 1; i++) {
    if (vis[i]) maxi++;
  }
  vector<long long int> dist;
  for (decltype(temp.begin()) it = temp.begin(); it != temp.end(); it++) {
    dist.push_back(*it);
  }
  long long int szdist = dist.size();
  index = 0;
  long long int mini = 0;
  while (index < szdist) {
    if (index + 2 < szdist && dist[index] + 1 == dist[index + 1] &&
        dist[index + 1] + 1 == dist[index + 2]) {
      index += 3;
      mini += 1;
    } else if (index + 1 < szdist && dist[index] + 1 == dist[index + 1]) {
      index += 2;
      mini += 1;
    } else if (index + 1 < szdist && dist[index] + 2 == dist[index + 1]) {
      index += 2;
      mini += 1;
    } else {
      index += 1;
      mini += 1;
    }
  }
  cout << mini << " " << maxi << endl;
  cerr << "Time : " << 1000 * ((double)clock()) / (double)CLOCKS_PER_SEC
       << "ms\n";
  return 0;
}
