#include <bits/stdc++.h>
using namespace std;
long long gcd(long long a, long long b) {
  long long t;
  if (a < b) {
    t = a;
    a = b;
    b = t;
  }
  if (a % b == 0) return b;
  return gcd(b, a % b);
}
int main() {
  long long N, aka = 0;
  vector<long long> V;
  cin >> N;
  for (int i = 0; i < (int)N; ++i) {
    long long t;
    cin >> t;
    if (t < 400)
      V.push_back(1);
    else if (t >= 400 && t < 800)
      V.push_back(2);
    else if (t >= 800 && t < 1200)
      V.push_back(3);
    else if (t >= 1200 && t < 1600)
      V.push_back(4);
    else if (t >= 1600 && t < 2000)
      V.push_back(5);
    else if (t >= 2000 && t < 2400)
      V.push_back(6);
    else if (t >= 2400 && t < 2800)
      V.push_back(7);
    else if (t >= 2800 && t < 3200)
      V.push_back(8);
    else if (t >= 3200)
      aka++;
  }
  sort(V.begin(), V.end());
  V.erase(unique(V.begin(), V.end()), V.end());
  if (V.size() == 0 && aka <= 8) {
    cout << "1 " << aka << endl;
  } else if (V.size() == 0 && aka > 8) {
    cout << "1 8" << endl;
  } else if (V.size() + aka >= 8) {
    cout << V.size() << " 8" << endl;
  } else {
    cout << V.size() << " " << V.size() + aka << endl;
  }
}
