
import java.util.Scanner;


public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);

		int N = sc.nextInt();

		int[] K = new int[N];
		for(int i = 0 ; i < N ; i++){
			K[i] = sc.nextInt();
		}

		sc.close();

		int[] A = new int[9];

		for(int i = 0 ; i < N ; i++){
			if(K[i]<=399){
				A[0]++;
			}
			else if(K[i]>=400 && K[i] <= 799){
				A[1]++;
			}
			else if(K[i]>=800 && K[i] <= 1199){
				A[2]++;
			}
			else if(K[i]>=1200 && K[i] <= 1599){
				A[3]++;
			}
			else if(K[i]>=1600 && K[i] <= 1999){
				A[4]++;
			}
			else if(K[i]>=2000 && K[i] <= 2399){
				A[5]++;
			}
			else if(K[i]>=2400 && K[i] <= 2799){
				A[6]++;
			}
			else if(K[i]>=2800 && K[i] <= 3199){
				A[7]++;
			}
			else{
				A[8]++;
			}
		}

		int ans = 0;
		for(int i = 0 ; i < 8 ; i++){
			if(A[i]!=0){
				ans++;
			}
		}
		if(ans != 0){
			System.out.println(Math.min(8, ans) + " " + (ans + A[8]));
		}
		else{
			System.out.println(1 + " " + (ans + A[8]));
		}
	}
} import java.util.Scanner; Scanner java.util public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);

		int N = sc.nextInt();

		int[] K = new int[N];
		for(int i = 0 ; i < N ; i++){
			K[i] = sc.nextInt();
		}

		sc.close();

		int[] A = new int[9];

		for(int i = 0 ; i < N ; i++){
			if(K[i]<=399){
				A[0]++;
			}
			else if(K[i]>=400 && K[i] <= 799){
				A[1]++;
			}
			else if(K[i]>=800 && K[i] <= 1199){
				A[2]++;
			}
			else if(K[i]>=1200 && K[i] <= 1599){
				A[3]++;
			}
			else if(K[i]>=1600 && K[i] <= 1999){
				A[4]++;
			}
			else if(K[i]>=2000 && K[i] <= 2399){
				A[5]++;
			}
			else if(K[i]>=2400 && K[i] <= 2799){
				A[6]++;
			}
			else if(K[i]>=2800 && K[i] <= 3199){
				A[7]++;
			}
			else{
				A[8]++;
			}
		}

		int ans = 0;
		for(int i = 0 ; i < 8 ; i++){
			if(A[i]!=0){
				ans++;
			}
		}
		if(ans != 0){
			System.out.println(Math.min(8, ans) + " " + (ans + A[8]));
		}
		else{
			System.out.println(1 + " " + (ans + A[8]));
		}
	}
} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);

		int N = sc.nextInt();

		int[] K = new int[N];
		for(int i = 0 ; i < N ; i++){
			K[i] = sc.nextInt();
		}

		sc.close();

		int[] A = new int[9];

		for(int i = 0 ; i < N ; i++){
			if(K[i]<=399){
				A[0]++;
			}
			else if(K[i]>=400 && K[i] <= 799){
				A[1]++;
			}
			else if(K[i]>=800 && K[i] <= 1199){
				A[2]++;
			}
			else if(K[i]>=1200 && K[i] <= 1599){
				A[3]++;
			}
			else if(K[i]>=1600 && K[i] <= 1999){
				A[4]++;
			}
			else if(K[i]>=2000 && K[i] <= 2399){
				A[5]++;
			}
			else if(K[i]>=2400 && K[i] <= 2799){
				A[6]++;
			}
			else if(K[i]>=2800 && K[i] <= 3199){
				A[7]++;
			}
			else{
				A[8]++;
			}
		}

		int ans = 0;
		for(int i = 0 ; i < 8 ; i++){
			if(A[i]!=0){
				ans++;
			}
		}
		if(ans != 0){
			System.out.println(Math.min(8, ans) + " " + (ans + A[8]));
		}
		else{
			System.out.println(1 + " " + (ans + A[8]));
		}
	} main {
		Scanner sc = new Scanner(System.in);

		int N = sc.nextInt();

		int[] K = new int[N];
		for(int i = 0 ; i < N ; i++){
			K[i] = sc.nextInt();
		}

		sc.close();

		int[] A = new int[9];

		for(int i = 0 ; i < N ; i++){
			if(K[i]<=399){
				A[0]++;
			}
			else if(K[i]>=400 && K[i] <= 799){
				A[1]++;
			}
			else if(K[i]>=800 && K[i] <= 1199){
				A[2]++;
			}
			else if(K[i]>=1200 && K[i] <= 1599){
				A[3]++;
			}
			else if(K[i]>=1600 && K[i] <= 1999){
				A[4]++;
			}
			else if(K[i]>=2000 && K[i] <= 2399){
				A[5]++;
			}
			else if(K[i]>=2400 && K[i] <= 2799){
				A[6]++;
			}
			else if(K[i]>=2800 && K[i] <= 3199){
				A[7]++;
			}
			else{
				A[8]++;
			}
		}

		int ans = 0;
		for(int i = 0 ; i < 8 ; i++){
			if(A[i]!=0){
				ans++;
			}
		}
		if(ans != 0){
			System.out.println(Math.min(8, ans) + " " + (ans + A[8]));
		}
		else{
			System.out.println(1 + " " + (ans + A[8]));
		}
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int N = sc.nextInt(); N sc.nextInt() sc.nextInt sc int[] K = new int[N]; K new int[N] N for(int i = 0 ; i < N ; i++){
			K[i] = sc.nextInt();
		} int i = 0 ; int i = 0 ; i 0 i < N i N i++ i++ i {
			K[i] = sc.nextInt();
		} {
			K[i] = sc.nextInt();
		} K[i] = sc.nextInt() K[i] K i sc.nextInt() sc.nextInt sc sc.close() sc.close sc int[] A = new int[9]; A new int[9] 9 for(int i = 0 ; i < N ; i++){
			if(K[i]<=399){
				A[0]++;
			}
			else if(K[i]>=400 && K[i] <= 799){
				A[1]++;
			}
			else if(K[i]>=800 && K[i] <= 1199){
				A[2]++;
			}
			else if(K[i]>=1200 && K[i] <= 1599){
				A[3]++;
			}
			else if(K[i]>=1600 && K[i] <= 1999){
				A[4]++;
			}
			else if(K[i]>=2000 && K[i] <= 2399){
				A[5]++;
			}
			else if(K[i]>=2400 && K[i] <= 2799){
				A[6]++;
			}
			else if(K[i]>=2800 && K[i] <= 3199){
				A[7]++;
			}
			else{
				A[8]++;
			}
		} int i = 0 ; int i = 0 ; i 0 i < N i N i++ i++ i {
			if(K[i]<=399){
				A[0]++;
			}
			else if(K[i]>=400 && K[i] <= 799){
				A[1]++;
			}
			else if(K[i]>=800 && K[i] <= 1199){
				A[2]++;
			}
			else if(K[i]>=1200 && K[i] <= 1599){
				A[3]++;
			}
			else if(K[i]>=1600 && K[i] <= 1999){
				A[4]++;
			}
			else if(K[i]>=2000 && K[i] <= 2399){
				A[5]++;
			}
			else if(K[i]>=2400 && K[i] <= 2799){
				A[6]++;
			}
			else if(K[i]>=2800 && K[i] <= 3199){
				A[7]++;
			}
			else{
				A[8]++;
			}
		} {
			if(K[i]<=399){
				A[0]++;
			}
			else if(K[i]>=400 && K[i] <= 799){
				A[1]++;
			}
			else if(K[i]>=800 && K[i] <= 1199){
				A[2]++;
			}
			else if(K[i]>=1200 && K[i] <= 1599){
				A[3]++;
			}
			else if(K[i]>=1600 && K[i] <= 1999){
				A[4]++;
			}
			else if(K[i]>=2000 && K[i] <= 2399){
				A[5]++;
			}
			else if(K[i]>=2400 && K[i] <= 2799){
				A[6]++;
			}
			else if(K[i]>=2800 && K[i] <= 3199){
				A[7]++;
			}
			else{
				A[8]++;
			}
		} if(K[i]<=399){
				A[0]++;
			}
			else if(K[i]>=400 && K[i] <= 799){
				A[1]++;
			}
			else if(K[i]>=800 && K[i] <= 1199){
				A[2]++;
			}
			else if(K[i]>=1200 && K[i] <= 1599){
				A[3]++;
			}
			else if(K[i]>=1600 && K[i] <= 1999){
				A[4]++;
			}
			else if(K[i]>=2000 && K[i] <= 2399){
				A[5]++;
			}
			else if(K[i]>=2400 && K[i] <= 2799){
				A[6]++;
			}
			else if(K[i]>=2800 && K[i] <= 3199){
				A[7]++;
			}
			else{
				A[8]++;
			} K[i]<=399 K[i] K i 399 {
				A[0]++;
			} A[0]++ A[0] A 0 if(K[i]>=400 && K[i] <= 799){
				A[1]++;
			}
			else if(K[i]>=800 && K[i] <= 1199){
				A[2]++;
			}
			else if(K[i]>=1200 && K[i] <= 1599){
				A[3]++;
			}
			else if(K[i]>=1600 && K[i] <= 1999){
				A[4]++;
			}
			else if(K[i]>=2000 && K[i] <= 2399){
				A[5]++;
			}
			else if(K[i]>=2400 && K[i] <= 2799){
				A[6]++;
			}
			else if(K[i]>=2800 && K[i] <= 3199){
				A[7]++;
			}
			else{
				A[8]++;
			} K[i]>=400 && K[i] <= 799 K[i]>=400 K[i] K i 400 K[i] <= 799 K[i] K i 799 {
				A[1]++;
			} A[1]++ A[1] A 1 if(K[i]>=800 && K[i] <= 1199){
				A[2]++;
			}
			else if(K[i]>=1200 && K[i] <= 1599){
				A[3]++;
			}
			else if(K[i]>=1600 && K[i] <= 1999){
				A[4]++;
			}
			else if(K[i]>=2000 && K[i] <= 2399){
				A[5]++;
			}
			else if(K[i]>=2400 && K[i] <= 2799){
				A[6]++;
			}
			else if(K[i]>=2800 && K[i] <= 3199){
				A[7]++;
			}
			else{
				A[8]++;
			} K[i]>=800 && K[i] <= 1199 K[i]>=800 K[i] K i 800 K[i] <= 1199 K[i] K i 1199 {
				A[2]++;
			} A[2]++ A[2] A 2 if(K[i]>=1200 && K[i] <= 1599){
				A[3]++;
			}
			else if(K[i]>=1600 && K[i] <= 1999){
				A[4]++;
			}
			else if(K[i]>=2000 && K[i] <= 2399){
				A[5]++;
			}
			else if(K[i]>=2400 && K[i] <= 2799){
				A[6]++;
			}
			else if(K[i]>=2800 && K[i] <= 3199){
				A[7]++;
			}
			else{
				A[8]++;
			} K[i]>=1200 && K[i] <= 1599 K[i]>=1200 K[i] K i 1200 K[i] <= 1599 K[i] K i 1599 {
				A[3]++;
			} A[3]++ A[3] A 3 if(K[i]>=1600 && K[i] <= 1999){
				A[4]++;
			}
			else if(K[i]>=2000 && K[i] <= 2399){
				A[5]++;
			}
			else if(K[i]>=2400 && K[i] <= 2799){
				A[6]++;
			}
			else if(K[i]>=2800 && K[i] <= 3199){
				A[7]++;
			}
			else{
				A[8]++;
			} K[i]>=1600 && K[i] <= 1999 K[i]>=1600 K[i] K i 1600 K[i] <= 1999 K[i] K i 1999 {
				A[4]++;
			} A[4]++ A[4] A 4 if(K[i]>=2000 && K[i] <= 2399){
				A[5]++;
			}
			else if(K[i]>=2400 && K[i] <= 2799){
				A[6]++;
			}
			else if(K[i]>=2800 && K[i] <= 3199){
				A[7]++;
			}
			else{
				A[8]++;
			} K[i]>=2000 && K[i] <= 2399 K[i]>=2000 K[i] K i 2000 K[i] <= 2399 K[i] K i 2399 {
				A[5]++;
			} A[5]++ A[5] A 5 if(K[i]>=2400 && K[i] <= 2799){
				A[6]++;
			}
			else if(K[i]>=2800 && K[i] <= 3199){
				A[7]++;
			}
			else{
				A[8]++;
			} K[i]>=2400 && K[i] <= 2799 K[i]>=2400 K[i] K i 2400 K[i] <= 2799 K[i] K i 2799 {
				A[6]++;
			} A[6]++ A[6] A 6 if(K[i]>=2800 && K[i] <= 3199){
				A[7]++;
			}
			else{
				A[8]++;
			} K[i]>=2800 && K[i] <= 3199 K[i]>=2800 K[i] K i 2800 K[i] <= 3199 K[i] K i 3199 {
				A[7]++;
			} A[7]++ A[7] A 7 {
				A[8]++;
			} A[8]++ A[8] A 8 int ans = 0; ans 0 for(int i = 0 ; i < 8 ; i++){
			if(A[i]!=0){
				ans++;
			}
		} int i = 0 ; int i = 0 ; i 0 i < 8 i 8 i++ i++ i {
			if(A[i]!=0){
				ans++;
			}
		} {
			if(A[i]!=0){
				ans++;
			}
		} if(A[i]!=0){
				ans++;
			} A[i]!=0 A[i] A i 0 {
				ans++;
			} ans++ ans if(ans != 0){
			System.out.println(Math.min(8, ans) + " " + (ans + A[8]));
		}
		else{
			System.out.println(1 + " " + (ans + A[8]));
		} ans != 0 ans 0 {
			System.out.println(Math.min(8, ans) + " " + (ans + A[8]));
		} System.out.println(Math.min(8, ans) + " " + (ans + A[8])) System.out.println System.out System System.out Math.min(8, ans) + " " + (ans + A[8]) Math.min(8, ans) + " " + (ans + A[8]) Math.min(8, ans) Math.min Math 8 ans " " (ans + A[8]) ans A[8] A 8 {
			System.out.println(1 + " " + (ans + A[8]));
		} System.out.println(1 + " " + (ans + A[8])) System.out.println System.out System System.out 1 + " " + (ans + A[8]) 1 + " " + (ans + A[8]) 1 " " (ans + A[8]) ans A[8] A 8 String[] args args public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);

		int N = sc.nextInt();

		int[] K = new int[N];
		for(int i = 0 ; i < N ; i++){
			K[i] = sc.nextInt();
		}

		sc.close();

		int[] A = new int[9];

		for(int i = 0 ; i < N ; i++){
			if(K[i]<=399){
				A[0]++;
			}
			else if(K[i]>=400 && K[i] <= 799){
				A[1]++;
			}
			else if(K[i]>=800 && K[i] <= 1199){
				A[2]++;
			}
			else if(K[i]>=1200 && K[i] <= 1599){
				A[3]++;
			}
			else if(K[i]>=1600 && K[i] <= 1999){
				A[4]++;
			}
			else if(K[i]>=2000 && K[i] <= 2399){
				A[5]++;
			}
			else if(K[i]>=2400 && K[i] <= 2799){
				A[6]++;
			}
			else if(K[i]>=2800 && K[i] <= 3199){
				A[7]++;
			}
			else{
				A[8]++;
			}
		}

		int ans = 0;
		for(int i = 0 ; i < 8 ; i++){
			if(A[i]!=0){
				ans++;
			}
		}
		if(ans != 0){
			System.out.println(Math.min(8, ans) + " " + (ans + A[8]));
		}
		else{
			System.out.println(1 + " " + (ans + A[8]));
		}
	}
} public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);

		int N = sc.nextInt();

		int[] K = new int[N];
		for(int i = 0 ; i < N ; i++){
			K[i] = sc.nextInt();
		}

		sc.close();

		int[] A = new int[9];

		for(int i = 0 ; i < N ; i++){
			if(K[i]<=399){
				A[0]++;
			}
			else if(K[i]>=400 && K[i] <= 799){
				A[1]++;
			}
			else if(K[i]>=800 && K[i] <= 1199){
				A[2]++;
			}
			else if(K[i]>=1200 && K[i] <= 1599){
				A[3]++;
			}
			else if(K[i]>=1600 && K[i] <= 1999){
				A[4]++;
			}
			else if(K[i]>=2000 && K[i] <= 2399){
				A[5]++;
			}
			else if(K[i]>=2400 && K[i] <= 2799){
				A[6]++;
			}
			else if(K[i]>=2800 && K[i] <= 3199){
				A[7]++;
			}
			else{
				A[8]++;
			}
		}

		int ans = 0;
		for(int i = 0 ; i < 8 ; i++){
			if(A[i]!=0){
				ans++;
			}
		}
		if(ans != 0){
			System.out.println(Math.min(8, ans) + " " + (ans + A[8]));
		}
		else{
			System.out.println(1 + " " + (ans + A[8]));
		}
	}
} Main

import java.util.Scanner;


public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);

		int N = sc.nextInt();

		int[] K = new int[N];
		for(int i = 0 ; i < N ; i++){
			K[i] = sc.nextInt();
		}

		sc.close();

		int[] A = new int[9];

		for(int i = 0 ; i < N ; i++){
			if(K[i]<=399){
				A[0]++;
			}
			else if(K[i]>=400 && K[i] <= 799){
				A[1]++;
			}
			else if(K[i]>=800 && K[i] <= 1199){
				A[2]++;
			}
			else if(K[i]>=1200 && K[i] <= 1599){
				A[3]++;
			}
			else if(K[i]>=1600 && K[i] <= 1999){
				A[4]++;
			}
			else if(K[i]>=2000 && K[i] <= 2399){
				A[5]++;
			}
			else if(K[i]>=2400 && K[i] <= 2799){
				A[6]++;
			}
			else if(K[i]>=2800 && K[i] <= 3199){
				A[7]++;
			}
			else{
				A[8]++;
			}
		}

		int ans = 0;
		for(int i = 0 ; i < 8 ; i++){
			if(A[i]!=0){
				ans++;
			}
		}
		if(ans != 0){
			System.out.println(Math.min(8, ans) + " " + (ans + A[8]));
		}
		else{
			System.out.println(1 + " " + (ans + A[8]));
		}
	}
}
