#include <bits/stdc++.h>
using namespace std;
long long int INF = 1e18;
double Pi = 3.141592653589;
const int mod = 1000000007;
struct edge {
  int to, cost;
};
vector<int> G[100005];
int dx[8] = {1, 0, -1, 0, 1, 1, -1, -1};
int dy[8] = {0, 1, 0, -1, 1, -1, -1, 1};
std::vector<pair<long long, long long> > tree[100010];
long long i, j;
long long n;
long long color[8] = {399, 799, 1199, 1599, 1999, 2399, 2799, 3199};
long long dp[9] = {0, 0, 0, 0, 0, 0, 0, 0, 0};
long long a;
long long low, high;
int main() {
  cin >> n;
  for (i = 0; i < n; i++) {
    cin >> a;
    for (j = 0; j <= 10; j++) {
      if (j == 8) {
        dp[8]++;
        break;
      }
      if (a <= color[j]) {
        dp[j]++;
        break;
      }
    }
  }
  long long ans = 0;
  for (i = 0; i <= 7; i++) {
    if (dp[i] != 0) ans++;
  }
  a = 8;
  if (ans == 0)
    low = 1;
  else
    low = ans;
  if (ans == 0)
    high = min(a, dp[8]);
  else
    high = min(a, ans + dp[8]);
  cout << low << " " << high << endl;
  return 0;
}
