#include <bits/stdc++.h>
using namespace std;
long long gray, brown, green, cyan, blue, yellow, orange, red;
inline void solve() {
  long long n, a, ans = 0, other = 0;
  cin >> n;
  while (n--) {
    cin >> a;
    if (a < 400) gray = 1;
    if (a >= 400 and a < 800) brown = 1;
    if (a >= 800 and a < 1200) green = 1;
    if (a >= 1200 and a < 1600) cyan = 1;
    if (a >= 1600 and a < 2000) blue = 1;
    if (a >= 2000 and a < 2400) yellow = 1;
    if (a >= 2400 and a < 2800) orange = 1;
    if (a >= 2800 and a < 3200) red = 1;
    if (a >= 3200) other++;
  }
  if (gray) ans++;
  if (brown) ans++;
  if (green) ans++;
  if (cyan) ans++;
  if (blue) ans++;
  if (orange) ans++;
  if (yellow) ans++;
  if (red) ans++;
  cout << max(ans, 1LL) << " " << min(ans + other, 8LL) << endl;
  return;
}
signed main() {
  long long n = 1;
  while (n--) solve();
  return 0;
}
