#include <bits/stdc++.h>
using namespace std;
string color(int n) {
  if (1 <= n && n < 400) {
    return "gray";
  } else if (400 <= n && n < 800) {
    return "brown";
  } else if (800 <= n && n < 1200) {
    return "green";
  } else if (1200 <= n && n < 1600) {
    return "light_blue";
  } else if (1600 <= n && n < 2000) {
    return "blue";
  } else if (2000 <= n && n < 2400) {
    return "yellow";
  } else if (2400 <= n && n < 2800) {
    return "orange";
  } else if (2800 <= n && n < 3200) {
    return "red";
  } else {
    return "rainbow";
  }
}
int main() {
  int n;
  cin >> n;
  int a[n];
  for (int i = 0; i < n; i++) {
    cin >> a[i];
  }
  set<string> s;
  int rainbow = 0;
  for (int i = 0; i < n; i++) {
    if (color(a[i]) == "rainbow") {
      rainbow++;
    }
    s.insert(color(a[i]));
  }
  if (rainbow == 0) {
    cout << s.size() << " " << s.size() << endl;
  } else if (s.size() == 1) {
    cout << 1 << " " << 1 << endl;
  } else {
    cout << s.size() - 1 << " " << s.size() + rainbow << endl;
  }
}
