#include <bits/stdc++.h>
using namespace std;
int main() {
  int a, s[5000], i, ans, t[10], m, flag;
  while (cin >> a) {
    m = 0;
    ans = 0;
    flag = 0;
    memset(t, 0x0, sizeof(t));
    t[10] = {0};
    for (i = 0; i < a; i++) cin >> s[i];
    for (i = 0; i < a; i++) {
      if (s[i] < 399) {
        t[0] = 1;
      } else if (s[i] < 799) {
        t[1] = 1;
      } else if (s[i] < 1199) {
        t[2] = 1;
      } else if (s[i] < 1599) {
        t[3] = 1;
      } else if (s[i] < 1999) {
        t[4] = 1;
      } else if (s[i] < 2399) {
        t[5] = 1;
      } else if (s[i] < 2799) {
        t[6] = 1;
      } else if (s[i] < 3199) {
        t[7] = 1;
      } else {
        m++;
      }
    }
    for (int j = 0; j <= 7; j++) {
      if (t[j] == 1) {
        flag = 1;
        ans++;
      }
    }
    if (flag == 1) {
      if (m + ans <= 8)
        cout << ans << " " << ans + m << endl;
      else if (m + ans > 8)
        cout << ans << " " << 8 << endl;
    } else if (flag == 0) {
      if (m + ans <= 8)
        cout << 1 << " " << ans + m << endl;
      else if (m + ans > 8)
        cout << 1 << " " << 8 << endl;
    }
  }
  return 0;
}
