#include <bits/stdc++.h>
using namespace std;
const int N = 200100;
int n, freq[N], mx, mn, cnt;
bool vis[N], f[N];
int main() {
  scanf("%d", &n);
  for (int i = 0; i < n; i++) {
    int x;
    scanf("%d", &x);
    freq[x]++;
  }
  for (int i = 1; i <= n; i++) {
    if (!freq[i]) continue;
    if (f[i + 1] || f[i] || f[i - 1]) continue;
    f[i + 1] = 1;
  }
  for (int i = 0; i <= n + 1; i++) mn += f[i];
  for (int i = 1; i <= n; i++) {
    int cnt = freq[i];
    if (!vis[i - 1] && cnt) {
      cnt--;
      vis[i - 1] = 1;
    }
    if (!vis[i] && cnt) {
      cnt--;
      vis[i] = 1;
    }
    if (!vis[i + 1] && cnt) {
      cnt--;
      vis[i + 1] = 1;
    }
  }
  for (int i = 0; i <= n + 1; i++) mx += vis[i];
  printf("%d %d", mn, mx);
}
