#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, a[101], ma = 0, mi = 0, color[8];
  for (int i = 0; i < 8; i++) color[i] = 0;
  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> a[i];
    if (a[i] >= 1 && a[i] <= 399 && color[0] == 0) color[0]++;
    if (a[i] >= 400 && a[i] < 800 && color[1] == 0) color[1]++;
    if (a[i] >= 800 && a[i] < 1200 && color[2] == 0) color[2]++;
    if (a[i] >= 1200 && a[i] < 1600 && color[3] == 0) color[3]++;
    if (a[i] >= 1600 && a[i] < 2000 && color[4] == 0) color[4]++;
    if (a[i] >= 2000 && a[i] < 2400 && color[5] == 0) color[5]++;
    if (a[i] >= 2400 && a[i] < 2800 && color[6] == 0) color[6]++;
    if (a[i] >= 2800 && a[i] < 3200 && color[7] == 0) color[7]++;
    if (a[i] >= 3200) ma++;
  }
  for (int i = 0; i < 8; i++) mi += color[i];
  ma += mi;
  cout << mi << " " << ma << endl;
  getchar();
  getchar();
  return 0;
}
