import std.stdio;
import std.conv;
import std.string;
import std.algorithm;
import std.array;
import std.format;
 
void main()
{
    string lines;
    string buf;
 
    while (!stdin.eof) {
      buf = stdin.readln();
      lines ~= buf;
    }

    string[] array = splitLines(lines);
    const int N   = to!int(array[0]);
    const int[] a = array[1].split(" ").map!(e => to!int(e)).array;
    
    int colors = 0, pro = 0;
    
    foreach (int l, int u; [1:399, 400:799, 800:1199, 1200:1599, 1600:1999, 2000:2399, 2400:2799, 2800:3199]) {
        colors += a.any!(e => e >= l && e < u ) ? 1 : 0;
    }
    pro = a.find!(e => e >= 3200).array.length.to!int;
    int l = colors;
    int u = colors+pro;
    writeln(format("%d %d", l, u));
}