#include <bits/stdc++.h>
using namespace std;
inline void scd(int &a) { scanf("%d", &a); }
inline void scdd(int &a, int &b) { scanf("%d %d", &a, &b); }
inline void sctd(int &a, int &b, int &c) { scanf("%d %d %d", &a, &b, &c); }
inline void sctlld(long long int &a, long long int &b, long long int &c) {
  scanf("%I64d %I64d %I64d", &a, &b, &c);
}
inline void scdlld(long long int &a, long long int &b) {
  scanf("%I64d %I64d", &a, &b);
}
inline void sclld(long long int &a) { scanf("%I64d", &a); }
inline void scllu(unsigned long long int &a) { scanf("%I64u", &a); }
inline void scdllu(unsigned long long int &a, unsigned long long int &b) {
  scanf("%I64u %I64u", &a, &b);
}
inline void sctllu(unsigned long long int &a, unsigned long long int &b,
                   unsigned long long int &c) {
  scanf("%I64u %I64u %I64u", &a, &b, &c);
}
template <class Ver>
inline void prd(Ver a) {
  cout << a << endl;
};
template <class Ver>
inline void prdd(Ver a, Ver b) {
  cout << a << " " << b << endl;
};
template <class Ver>
inline void prtd(Ver a, Ver b, Ver c) {
  cout << a << " " << b << " " << c << endl;
};
inline void debug() { printf("asd\n"); }
template <class Ver>
inline void debugd(Ver a) {
  cout << "--- " << a << endl;
};
template <class Ver>
inline void debugdd(Ver a, Ver b) {
  cout << "--- " << a << " " << b << endl;
};
template <class Ver>
inline void debugtd(Ver a, Ver b, Ver c) {
  cout << "--- " << a << " " << b << " " << c << endl;
};
void st() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
}
int main() {
  st();
  int ver = 0, niy = 0;
  int c[] = {0, 0, 0, 0, 0, 0, 0, 0, 0};
  int tdk = 0;
  scd(ver);
  for (int i = 0; i < ver; i++) {
    scd(niy);
    if (niy <= 399) {
      c[0]++;
    } else if (niy <= 799) {
      c[1]++;
    } else if (niy <= 1199) {
      c[2]++;
    } else if (niy <= 1599) {
      c[3]++;
    } else if (niy <= 1999) {
      c[4]++;
    } else if (niy <= 2399) {
      c[5]++;
    } else if (niy <= 2799) {
      c[6]++;
    } else if (niy <= 3199) {
      c[7]++;
    } else
      tdk++;
  }
  int d = 0;
  for (int i = 0; i < 8; i++) {
    if (c[i] > 0) d++;
  }
  if (tdk == 0) {
    if (d > 8) d = 8;
    prdd(d, d);
  } else if (tdk == ver) {
    if (ver > 8) ver = 8;
    prdd(0, ver);
  } else {
    if (tdk <= d) {
      tdk += d;
      if (tdk > 8) tdk = 8;
      prdd(d, tdk);
    } else {
      tdk += d;
      if (tdk > 8) tdk = 8;
      prdd(d != 0 ? d : 0, (d + tdk) <= 8 ? (d + tdk) : 8);
    }
  }
  return 0;
}
