import java.util.ArrayList;
import java.util.HashSet;
import java.util.List;
import java.util.Scanner;
import java.util.Set;

public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int max = 0;
		List<Integer> list = new ArrayList<>();
		Set<String> set = new HashSet<>();
		for (int i = 0; i < n; i++) {
			list.add(sc.nextInt());
		}

		for (int a  : list) {
			if (a < 400) set.add("灰色");
			else if (a < 800) set.add("茶色");
			else if (a < 1200) set.add("緑色");
			else if (a < 1600) set.add("水色");
			else if (a < 2000) set.add("青色");
			else if (a < 2400) set.add("黄色");
			else if (a < 2800) set.add("橙色");
			else if (a < 3200) set.add("赤色");
			else if (a >= 3200) max++;
 		}

		max += set.size();

		if (set.size() == 0) {
			System.out.print(1 + " ");
			System.out.println(max);
		}else {
			System.out.print(set.size() + " ");
			System.out.println(max);
		}
		sc.close();
	}

}
/tmp/hf-datasets-cache/medium/datasets/42704881117311-config-parquet-and-info-qiankunmu-Project_CodeNet-896c9d36/hub/datasets--qiankunmu--Project_CodeNet_Python800_and_Java250/snapshots/c899fde44a77ba1cc14973ed3de064e4ff3aadc7/Project_CodeNet_Java250.tar.gz