using System;
using System.Linq;
using System.Collections.Generic;
public class Hello{
    public static void Main(){
        var N = int.Parse(Console.ReadLine());
        var a = Console.ReadLine().Split(' ').Select(int.Parse).ToArray();
        var hash = new HashSet<string>();
        var fill = 0;
        var rate = new string[]{"灰色","茶色","緑色","水色","青色","黄色","橙色","赤色"};
        for(var i = 0;i < N;i++){
            if(a[i] >= 3200){
                fill++;
                continue;
            }
            hash.Add(rate[(a[i] + 1) / 400]);
        }
        Console.WriteLine(hash.Count);
        Console.WriteLine((hash.Count + fill < 8) ? hash.Count + fill : 8);
    }
}