#include <bits/stdc++.h>
using namespace std;
long long mod(long long a) {
  long long c = a % (long long)(1E9 + 7);
  if (c >= 0) return c;
  return c + (long long)(1E9 + 7);
}
long long inf = (long long)1E16;
long long max(long long a, long long b) {
  if (a < b)
    return b;
  else
    return a;
}
long long min(long long a, long long b) {
  if (a > b)
    return b;
  else
    return a;
}
void Max(long long &pos, long long val) { pos = max(pos, val); }
void Min(long long &pos, long long val) { pos = min(pos, val); }
void Add(long long &pos, long long val) { pos = mod(pos + val); }
long double EPS = 1E-9;
string bina(long long i, long long x) {
  string ans = "";
  while (i > 0) {
    if (i % 2 == 1) {
      ans = '1' + ans;
      i = i / 2;
    } else {
      ans = '0' + ans;
      i = i / 2;
    }
  }
  while (ans.size() < x) {
    ans = '0' + ans;
  }
  return ans;
}
long long bi(string i) {
  long long c = 1;
  long long ans = 0;
  for (long long j = i.size() - 1; j >= 0; j--) {
    if (i[j] == '1') {
      ans = ans + c;
    }
    c = c * 2;
  }
  return ans;
}
bool b[200][1000];
int main() {
  long long n;
  cin >> n;
  long long a[n];
  for (long long i = 0; i <= n - 1; i++) {
    cin >> a[i];
  }
  long long rate[8];
  rate[0] = 400;
  for (long long i = 1; i <= 7; i++) {
    rate[i] = rate[i - 1] + 400;
  }
  b[0][0] = 1;
  long long r;
  string s;
  for (long long i = 0; i <= n - 1; i++) {
    r = 10;
    for (long long j = 0; j <= 7; j++) {
      if (a[i] < rate[j]) {
        r = j;
        break;
      }
    }
    for (long long j = 0; j <= pow(2, 8) - 1; j++) {
      if (b[i][j]) {
        if (r == 10) {
          s = bina(j, 8);
          for (long long k = 0; k <= 7; k++) {
            if (s[k] == '0') {
              s[k] = '1';
              b[i + 1][bi(s)] = 1;
              s[k] = '0';
            } else {
              b[i + 1][j] = 1;
            }
          }
        } else {
          s = bina(j, 8);
          s[r] = '1';
          b[i + 1][bi(s)] = 1;
        }
      }
    }
  }
  long long mini = 100, maxi = 0;
  long long counter;
  for (long long i = 0; i <= pow(2, 8) - 1; i++) {
    if (b[n][i]) {
      counter = 0;
      s = bina(i, 8);
      for (long long j = 0; j <= 7; j++) {
        if (s[j] == '1') {
          counter++;
        }
      }
      maxi = max(maxi, counter);
      mini = min(mini, counter);
    }
  }
  cout << mini << ' ' << maxi << endl;
  return 0;
}
