#include <bits/stdc++.h>
using namespace std;
int main() {
  int N;
  cin >> N;
  int gray = 0;
  int brown = 0;
  int green = 0;
  int cian = 0;
  int blue = 0;
  int yellow = 0;
  int orange = 0;
  int red = 0;
  int free = 0;
  for (int i = 0; i < (int)(N); i++) {
    int rate;
    cin >> rate;
    if (0 <= rate && rate < 400) gray++;
    if (400 <= rate && rate < 800) brown++;
    if (800 <= rate && rate < 1200) green++;
    if (1200 <= rate && rate < 1600) cian++;
    if (1600 <= rate && rate < 2000) blue++;
    if (2000 <= rate && rate < 2400) yellow++;
    if (2400 <= rate && rate < 2800) orange++;
    if (2800 <= rate && rate < 3200) red++;
    if (3200 <= rate) free++;
  }
  int ans = 0;
  if (gray >= 1) ans++;
  if (brown >= 1) ans++;
  if (green >= 1) ans++;
  if (cian >= 1) ans++;
  if (blue >= 1) ans++;
  if (yellow >= 1) ans++;
  if (orange >= 1) ans++;
  if (red >= 1) ans++;
  cout << ans << " " << ans + free << endl;
}
