#include <bits/stdc++.h>
using namespace std;
int main(void) {
  int n;
  int a[101];
  bool flag[9] = {};
  int count = 0;
  int maxi, mini;
  cin >> n;
  for (int i = 1; i <= n; i++) {
    cin >> a[i];
  }
  for (int i = 1; i <= n; i++) {
    if (a[i] % 400 >= 8) {
      flag[8] = true;
    } else {
      flag[a[i] % 400] = true;
    }
  }
  for (int i = 0; i <= 7; i++) {
    if (flag[i]) {
      count++;
    }
  }
  if (flag[8]) {
    mini = count;
    maxi = count + 1;
  } else {
    mini = count;
    maxi = count;
  }
  cout << mini << " " << maxi << endl;
  return 0;
}
