#include <bits/stdc++.h>
using namespace std;
template <typename T>
ostream& operator<<(ostream& os, const vector<T>& vec) {
  os << "[";
  for (int i = 0; i < vec.size(); i++) {
    os << vec[i] << ",";
  }
  os << "]";
  return os;
}
template <typename T>
T input() {
  T t;
  cin >> t;
  return t;
}
template <typename T>
vector<T> input(const int N) {
  vector<T> v(N);
  for (int i = 0; i < static_cast<int>(N); i++) cin >> v[i];
  return v;
}
long long gcd(long long a, long long b) {
  if (b == 0) {
    return a;
  }
  return gcd(b, a % b);
}
long long lcm(long long a, long long b) { return (a / gcd(a, b)) * b; }
long long mul(const long long& a, const long long& b, const long long& mod) {
  return ((a % mod) * (b % mod)) % mod;
}
long long power(const long long& x, const long long& y, const long long& mod) {
  if (y == 0) {
    return 1;
  } else if (y == 1) {
    return x % mod;
  } else {
    long long value = power(x, y / 2, mod);
    if (y % 2 == 0) {
      return mul(value, value, mod);
    } else {
      return mul(value, value, mod) * x % mod;
    }
  }
}
long long div(const long long& a, const long long& b, const long long& mod) {
  return mul(a, power(b, mod - 2, mod), mod);
}
map<long long, long long> factorials;
long long factorial(const long long& n, const long long& mod) {
  if (n == 0 || n == 1) {
    return 1;
  }
  if (factorials[n] != 0) {
    return factorials[n];
  }
  factorials[n] = n * factorial(n - 1, mod) % mod;
  return factorials[n] % mod;
}
long long combination(const long long& n, const long long& x,
                      const long long& mod) {
  long long numerator = 1;
  long long denominator = 1;
  for (int i = 0; i < static_cast<int>(x); i++) {
    numerator *= (n - i) % mod;
    numerator %= mod;
    denominator *= (i + 1) % mod;
    denominator %= mod;
  }
  return div(numerator, denominator, mod);
}
int main() {
  const int RATE_GRAY = 399;
  const int RATE_BROWN = 799;
  const int RATE_GREEN = 1199;
  const int RATE_LIGHT_BLUE = 1599;
  const int RATE_DARK_BLUE = 1999;
  const int RATE_YELLOW = 2399;
  const int RATE_ORANGE = 2799;
  const int RATE_RED = 3199;
  int N;
  cin >> N;
  int rate;
  map<int, int> playerGroups;
  int minimum = 0;
  int maximum = 0;
  for (int i = 0; i < static_cast<int>(N); i++) {
    cin >> rate;
    if (0 < rate && rate <= RATE_GRAY) {
      playerGroups[RATE_GRAY] += 1;
      if (playerGroups[RATE_GRAY] == 1) {
        minimum += 1;
        maximum += 1;
      }
    } else if (RATE_GRAY < rate && rate <= RATE_BROWN) {
      playerGroups[RATE_BROWN] += 1;
      if (playerGroups[RATE_BROWN] == 1) {
        minimum += 1;
        maximum += 1;
      }
    } else if (RATE_BROWN < rate && rate <= RATE_GREEN) {
      playerGroups[RATE_GREEN] += 1;
      if (playerGroups[RATE_GREEN] == 1) {
        minimum += 1;
        maximum += 1;
      }
    } else if (RATE_GREEN < rate && rate <= RATE_LIGHT_BLUE) {
      playerGroups[RATE_LIGHT_BLUE] += 1;
      if (playerGroups[RATE_LIGHT_BLUE] == 1) {
        minimum += 1;
        maximum += 1;
      }
    } else if (RATE_LIGHT_BLUE < rate && rate <= RATE_DARK_BLUE) {
      playerGroups[RATE_DARK_BLUE] += 1;
      if (playerGroups[RATE_DARK_BLUE] == 1) {
        minimum += 1;
        maximum += 1;
      }
    } else if (RATE_DARK_BLUE < rate && rate <= RATE_YELLOW) {
      playerGroups[RATE_YELLOW] += 1;
      if (playerGroups[RATE_YELLOW] == 1) {
        minimum += 1;
        maximum += 1;
      }
    } else if (RATE_YELLOW < rate && rate <= RATE_ORANGE) {
      playerGroups[RATE_ORANGE] += 1;
      if (playerGroups[RATE_ORANGE] == 1) {
        minimum += 1;
        maximum += 1;
      }
    } else if (RATE_ORANGE < rate && rate <= RATE_RED) {
      playerGroups[RATE_RED] += 1;
      if (playerGroups[RATE_RED] == 1) {
        minimum += 1;
        maximum += 1;
      }
    } else if (RATE_RED < rate) {
      maximum += 1;
    }
  }
  cout << minimum << " " << maximum << endl;
  return 0;
}
