#include <bits/stdc++.h>
using namespace std;
const int maxn = 2e5 + 7;
int n, a[maxn];
bool vis[maxn];
int getlo() {
  memset(vis, 0, sizeof(vis));
  int ans = 0, x;
  for (int i = 1; i <= n; ++i) {
    x = a[i];
    if (vis[x - 1] || vis[x] || vis[x + 1]) continue;
    ans++;
    vis[x + 1] = 1;
  }
  return ans;
}
int gethi() {
  memset(vis, 0, sizeof(vis));
  int ans = 0, x;
  for (int i = 1; i <= n; ++i) {
    x = a[i];
    if (vis[x - 1] && vis[x] && vis[x + 1]) continue;
    ans++;
    if (!vis[x - 1])
      vis[x - 1] = 1;
    else if (!vis[x])
      vis[x] = 1;
    else
      vis[x + 1] = 1;
  }
  return ans;
}
int main() {
  ios::sync_with_stdio(0);
  cin >> n;
  for (int i = 1; i <= n; ++i) {
    cin >> a[i];
  }
  sort(a + 1, a + 1 + n);
  int b = getlo();
  int c = gethi();
  cout << b << " " << c;
  return 0;
}
