#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base ::sync_with_stdio(false);
  ;
  cin.tie(NULL);
  ;
  long long int t = 1;
  while (t--) {
    long long int n;
    cin >> n;
    long long int a[n];
    long long int i, j, k;
    for (i = 0; i < n; i++) cin >> a[i];
    sort(a, a + n);
    long long int mins = 0;
    bool vis[200000 + 5];
    memset(vis, false, sizeof(vis));
    for (i = 0; i < n; i++) {
      vis[a[i]] = true;
    }
    for (i = 0; i <= 200000; i++) {
      if (vis[i]) {
        mins++;
        if (vis[i + 2])
          i += 2;
        else if (vis[i + 1])
          i++;
      }
    }
    memset(vis, false, sizeof(vis));
    for (i = 0; i < n;) {
      long long int x = a[i];
      j = i;
      while (i < n && x == a[i]) i++;
      long long int freq = i - j;
      if (!vis[x - 1] == true) {
        vis[x - 1] = true;
        freq--;
      }
      if (freq && !vis[x]) vis[x] = true, freq--;
      if (freq && !vis[x + 1]) vis[x + 1] = true;
    }
    long long int maxs = 0;
    for (i = 0; i <= 200002; i++) {
      if (vis[i]) maxs++;
    }
    cout << mins << " " << maxs << "\n";
  }
}
