#include <bits/stdc++.h>
using namespace std;
const int maxn = 2e5 + 100;
int a[maxn];
bool vis[maxn];
int pmax = 0;
int pmin = 0;
int main() {
  ios::sync_with_stdio(false);
  int N;
  cin >> N;
  for (int i = 1; i <= N; i++) cin >> a[i];
  sort(a + 1, a + 1 + N);
  for (int i = 1; i <= N; i++) {
    int x = a[i];
    if (vis[x - 1] == false)
      vis[x - 1] = true;
    else if (vis[x] == false)
      vis[x] = true;
    else if (vis[x + 1] == false)
      vis[x + 1] = true;
  }
  for (int i = 0; i < maxn; i++)
    if (vis[i] == true) pmax += 1;
  memset(vis, 0, sizeof(vis));
  int cnt = N;
  N = unique(a + 1, a + 1 + N) - (a + 1);
  for (int i = 1; i <= N; i++) {
    int x = a[i];
    if (vis[x - 1] == true)
      a[i] = x - 1;
    else if (vis[x + 1] == true)
      a[i] = x + 1;
    else if (vis[x] == true)
      continue;
    else {
      a[i] = x + 1;
      vis[x + 1] = true;
    }
  }
  for (int i = 0; i <= cnt + 1; i++)
    if (vis[i] == true) pmin += 1;
  cout << pmin << ' ' << pmax << endl;
  return 0;
}
