#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int n;
  cin >> n;
  int x[n];
  vector<int> vis(n + 2, 0);
  int ansMin = 0, ansMax = 0;
  for (int i = 0; i < n; ++i) {
    cin >> x[i];
  }
  sort(x, x + n);
  for (int i = 0; i < n; ++i) {
    if (vis[x[i] - 1] == 0) {
      vis[x[i] - 1] = 1;
      ansMax++;
    } else if (vis[x[i]] == 0) {
      vis[x[i]] = 1;
      ansMax++;
    } else if (vis[x[i] + 1] == 0) {
      vis[x[i] + 1] = 1;
      ansMax++;
    }
  }
  fill(vis.begin(), vis.end(), 0);
  for (int i = 0; i < n; ++i) {
    if (vis[x[i] - 1] == 1) {
      vis[x[i] - 1] = 1;
    } else if (vis[x[i]] == 1) {
      vis[x[i]] = 1;
    } else if (vis[x[i] + 1] == 1) {
      vis[x[i] + 1] = 1;
    } else {
      vis[x[i] + 1] = 1;
      ansMin++;
    }
  }
  cout << ansMin << " " << ansMax << endl;
  return 0;
}
