#include <bits/stdc++.h>
using namespace std;
const int N = 2e5 + 10;
int cnt[N];
int movedCnt[N];
int movedCnt2[N];
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  int n;
  cin >> n;
  for (int i = 1; i <= n; i++) {
    int inp;
    cin >> inp;
    cnt[inp]++;
    movedCnt[inp]++;
    movedCnt2[inp]++;
  }
  for (int i = 1; i <= n; i++) {
    if (cnt[i] != movedCnt[i]) continue;
    if (movedCnt[i - 1] != 0 && movedCnt[i - 1] != cnt[i - 1])
      movedCnt[i - 1] += movedCnt[i];
    else
      movedCnt[i + 1] += movedCnt[i];
    movedCnt[i] = 0;
  }
  int minAns = 0;
  for (int i = 0; i <= n + 1; i++)
    if (movedCnt[i] != 0) minAns++;
  for (int i = 1; i <= n; i++) {
    if (cnt[i] == 0) continue;
    if (cnt[i] == 1) {
      if (movedCnt2[i - 1] == 0) {
        movedCnt2[i - 1]++;
        movedCnt2[i]--;
      }
      if (movedCnt2[i] > 1) {
        movedCnt2[i + 1]++;
        movedCnt2[i]--;
      }
      continue;
    }
    if (cnt[i] >= 3) {
      movedCnt2[i - 1]++;
      movedCnt2[i + 1]++;
      movedCnt2[i] -= 2;
      continue;
    }
    if (movedCnt2[i - 1] == 0) {
      movedCnt2[i - 1]++;
      movedCnt2[i]--;
      continue;
    }
    movedCnt2[i + 1]++;
    movedCnt2[i]--;
  }
  int maxAns = 0;
  for (int i = 0; i <= n + 1; i++)
    if (movedCnt2[i] != 0) maxAns++;
  cout << minAns << " " << maxAns << "\n";
  return 0;
}
