#include <bits/stdc++.h>
using namespace std;
const int N = 2e5 + 5;
int a[N], vis[N];
int main() {
  int n;
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) {
    scanf("%d", &a[i]);
  }
  sort(a + 1, a + n + 1);
  int ans1 = 0, ans2 = 0;
  for (int i = 1; i <= n; i++) {
    if (vis[a[i] - 1] || vis[a[i]] || vis[a[i] + 1]) {
    } else {
      ans1++;
      vis[a[i] + 1] = 1;
    }
  }
  memset(vis, 0, sizeof(vis));
  for (int i = 1; i <= n; i++) {
    if (!vis[a[i] - 1]) {
      ans2++;
      vis[a[i] - 1] = 1;
    } else if (!vis[a[i]]) {
      ans2++;
      vis[a[i]] = 1;
    } else if (!vis[a[i] + 1]) {
      ans2++;
      vis[a[i] + 1] = 1;
    }
  }
  printf("%d %d", ans1, ans2);
}
