#include <bits/stdc++.h>
using namespace std;
int find_max(vector<int> h) {
  vector<int> vis(h.size(), 0);
  for (int i = 0; i < h.size() - 2; ++i) {
    if (vis[i] == 0 and h[i] > 0) {
      vis[i] = 1;
      h[i]--;
    }
    if (vis[i + 1] == 0 and h[i] > 0) {
      vis[i + 1] = 1;
      h[i]--;
    }
    if (vis[i + 2] == 0 and h[i] > 0) {
      vis[i + 2] = 1;
      h[i]--;
    }
  }
  int ans = 0;
  for (int i = 0; i < vis.size(); ++i) {
    ans += vis[i];
  }
  return ans;
}
int find_min(vector<int> h) {
  vector<int> dp(h.size() + 5, 0);
  dp.back() = 0;
  for (int i = h.size() - 1; i >= 0; --i) {
    if (h[i] == 0) {
      dp[i] = dp[i + 1];
    } else {
      dp[i] = min(dp[i + 2] + 1, dp[i + 3] + 1);
    }
  }
  return dp[0];
}
int main() {
  vector<int> h;
  int n;
  cin >> n;
  h.resize(n + 2, 0);
  int tmp;
  for (int i = 0; i < n; ++i) {
    cin >> tmp;
    h[tmp - 1]++;
  }
  cout << find_min(h) << " " << find_max(h) << "\n";
}
