#include <bits/stdc++.h>
using namespace std;
const double pi =
    3.14159265358979323846264338327950288419716939937510582097494459230;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  long long n, i, x;
  cin >> n;
  int vis[n + 4];
  int cnt[n + 4];
  memset(cnt, 0, sizeof(cnt));
  memset(vis, 0, sizeof(vis));
  for (i = 0; i < n; i++) {
    cin >> x;
    cnt[x]++;
  }
  for (i = 1; i <= n; i++) {
    if (cnt[i] >= 3) {
      vis[i - 1] = 1;
      vis[i] = 1;
      vis[i + 1] = 1;
    } else {
      int d = cnt[i], j;
      for (j = i - 1; j <= i + 1; j++) {
        if (d == 0) break;
        if (vis[j] == 1)
          continue;
        else {
          vis[j] = 1;
          d--;
        }
      }
    }
  }
  int ans = 0;
  for (i = 1; i <= n; i++) {
    if (cnt[i] == 0) continue;
    ans++;
    i = i + 2;
  }
  cout << ans << " " << count(vis, vis + n + 2, 1);
  return 0;
}
