#include <bits/stdc++.h>
using namespace std;
int a[200005], vis[200005];
int main() {
  int n;
  cin >> n;
  for (int i = 1; i <= n; i++) cin >> a[i];
  sort(a + 1, a + n + 1);
  for (int i = 1; i <= n; i++) {
    if (vis[a[i] - 1]) continue;
    if (vis[a[i]]) continue;
    if (vis[a[i] + 1]) continue;
    vis[a[i] + 1] = 1;
  }
  int res = 0;
  for (int i = 0; i <= n + 1; i++)
    if (vis[i]) res++, vis[i] = 0;
  cout << res << " ";
  for (int i = 1; i <= n; i++) {
    if (vis[a[i] - 1]) {
      if (vis[a[i]])
        vis[a[i] + 1] = 1;
      else
        vis[a[i]] = 1;
    } else {
      vis[a[i] - 1] = 1;
    }
  }
  res = 0;
  for (int i = 0; i <= n + 1; i++)
    if (vis[i]) res++, vis[i] = 0;
  cout << res << endl;
}
