import java.io.BufferedReader;
import java.io.InputStreamReader;



class Main{

	public static void main(String[] args) throws Exception {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		int n = Integer.parseInt(br.readLine());
		String[] input = br.readLine().split(" ");
		int[] a = new int[n];
		for(int i = 0;i < n;i++){
			a[i] = Integer.parseInt(input[i]);
		}
		int[] color = new int[8];
		int count1 = 0;
		int count2 = 0;
		for(int i = 0;i < n;i++){
			if(1 <= a[i] && a[i] <= 399){
				color[0] = 1;
			}else if(400 <= a[i] && a[i] <= 799){
				color[1] = 1;
			}else if(800 <= a[i] && a[i] <= 1199){
				color[2] = 1;
			}else if(1200 <= a[i] && a[i] <= 1599){
				color[3] = 1;
			}else if(1600 <= a[i] && a[i] <= 1999){
				color[4] = 1;
			}else if(2000 <= a[i] && a[i] <= 2399){
				color[5] = 1;
			}else if(2400 <= a[i] && a[i] <= 2799){
				color[6] = 1;
			}else if(2800 <= a[i] && a[i] <= 3199){
				color[7] = 1;
			}else if(3200 <= a[i]){
				count2 += 1;
			}
		}
		for(int i = 0;i < 8;i++){
			if(color[i] != 0){
				count1 += 1;
				count2 += 1;
			}
		}
		if(count1 == 0){
			count1 += 1;
		}
		System.out.println(String.valueOf(count1) + " " + String.valueOf(count2));

	}

} import java.io.BufferedReader; BufferedReader java.io import java.io.InputStreamReader; InputStreamReader java.io class Main{

	public static void main(String[] args) throws Exception {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		int n = Integer.parseInt(br.readLine());
		String[] input = br.readLine().split(" ");
		int[] a = new int[n];
		for(int i = 0;i < n;i++){
			a[i] = Integer.parseInt(input[i]);
		}
		int[] color = new int[8];
		int count1 = 0;
		int count2 = 0;
		for(int i = 0;i < n;i++){
			if(1 <= a[i] && a[i] <= 399){
				color[0] = 1;
			}else if(400 <= a[i] && a[i] <= 799){
				color[1] = 1;
			}else if(800 <= a[i] && a[i] <= 1199){
				color[2] = 1;
			}else if(1200 <= a[i] && a[i] <= 1599){
				color[3] = 1;
			}else if(1600 <= a[i] && a[i] <= 1999){
				color[4] = 1;
			}else if(2000 <= a[i] && a[i] <= 2399){
				color[5] = 1;
			}else if(2400 <= a[i] && a[i] <= 2799){
				color[6] = 1;
			}else if(2800 <= a[i] && a[i] <= 3199){
				color[7] = 1;
			}else if(3200 <= a[i]){
				count2 += 1;
			}
		}
		for(int i = 0;i < 8;i++){
			if(color[i] != 0){
				count1 += 1;
				count2 += 1;
			}
		}
		if(count1 == 0){
			count1 += 1;
		}
		System.out.println(String.valueOf(count1) + " " + String.valueOf(count2));

	}

} Main public static void main(String[] args) throws Exception {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		int n = Integer.parseInt(br.readLine());
		String[] input = br.readLine().split(" ");
		int[] a = new int[n];
		for(int i = 0;i < n;i++){
			a[i] = Integer.parseInt(input[i]);
		}
		int[] color = new int[8];
		int count1 = 0;
		int count2 = 0;
		for(int i = 0;i < n;i++){
			if(1 <= a[i] && a[i] <= 399){
				color[0] = 1;
			}else if(400 <= a[i] && a[i] <= 799){
				color[1] = 1;
			}else if(800 <= a[i] && a[i] <= 1199){
				color[2] = 1;
			}else if(1200 <= a[i] && a[i] <= 1599){
				color[3] = 1;
			}else if(1600 <= a[i] && a[i] <= 1999){
				color[4] = 1;
			}else if(2000 <= a[i] && a[i] <= 2399){
				color[5] = 1;
			}else if(2400 <= a[i] && a[i] <= 2799){
				color[6] = 1;
			}else if(2800 <= a[i] && a[i] <= 3199){
				color[7] = 1;
			}else if(3200 <= a[i]){
				count2 += 1;
			}
		}
		for(int i = 0;i < 8;i++){
			if(color[i] != 0){
				count1 += 1;
				count2 += 1;
			}
		}
		if(count1 == 0){
			count1 += 1;
		}
		System.out.println(String.valueOf(count1) + " " + String.valueOf(count2));

	} main {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		int n = Integer.parseInt(br.readLine());
		String[] input = br.readLine().split(" ");
		int[] a = new int[n];
		for(int i = 0;i < n;i++){
			a[i] = Integer.parseInt(input[i]);
		}
		int[] color = new int[8];
		int count1 = 0;
		int count2 = 0;
		for(int i = 0;i < n;i++){
			if(1 <= a[i] && a[i] <= 399){
				color[0] = 1;
			}else if(400 <= a[i] && a[i] <= 799){
				color[1] = 1;
			}else if(800 <= a[i] && a[i] <= 1199){
				color[2] = 1;
			}else if(1200 <= a[i] && a[i] <= 1599){
				color[3] = 1;
			}else if(1600 <= a[i] && a[i] <= 1999){
				color[4] = 1;
			}else if(2000 <= a[i] && a[i] <= 2399){
				color[5] = 1;
			}else if(2400 <= a[i] && a[i] <= 2799){
				color[6] = 1;
			}else if(2800 <= a[i] && a[i] <= 3199){
				color[7] = 1;
			}else if(3200 <= a[i]){
				count2 += 1;
			}
		}
		for(int i = 0;i < 8;i++){
			if(color[i] != 0){
				count1 += 1;
				count2 += 1;
			}
		}
		if(count1 == 0){
			count1 += 1;
		}
		System.out.println(String.valueOf(count1) + " " + String.valueOf(count2));

	} BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); br new BufferedReader(new InputStreamReader(System.in)) int n = Integer.parseInt(br.readLine()); n Integer.parseInt(br.readLine()) Integer.parseInt Integer br.readLine() br.readLine br String[] input = br.readLine().split(" "); input br.readLine().split(" ") br.readLine().split br.readLine() br.readLine br " " int[] a = new int[n]; a new int[n] n for(int i = 0;i < n;i++){
			a[i] = Integer.parseInt(input[i]);
		} int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
			a[i] = Integer.parseInt(input[i]);
		} {
			a[i] = Integer.parseInt(input[i]);
		} a[i] = Integer.parseInt(input[i]) a[i] a i Integer.parseInt(input[i]) Integer.parseInt Integer input[i] input i int[] color = new int[8]; color new int[8] 8 int count1 = 0; count1 0 int count2 = 0; count2 0 for(int i = 0;i < n;i++){
			if(1 <= a[i] && a[i] <= 399){
				color[0] = 1;
			}else if(400 <= a[i] && a[i] <= 799){
				color[1] = 1;
			}else if(800 <= a[i] && a[i] <= 1199){
				color[2] = 1;
			}else if(1200 <= a[i] && a[i] <= 1599){
				color[3] = 1;
			}else if(1600 <= a[i] && a[i] <= 1999){
				color[4] = 1;
			}else if(2000 <= a[i] && a[i] <= 2399){
				color[5] = 1;
			}else if(2400 <= a[i] && a[i] <= 2799){
				color[6] = 1;
			}else if(2800 <= a[i] && a[i] <= 3199){
				color[7] = 1;
			}else if(3200 <= a[i]){
				count2 += 1;
			}
		} int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
			if(1 <= a[i] && a[i] <= 399){
				color[0] = 1;
			}else if(400 <= a[i] && a[i] <= 799){
				color[1] = 1;
			}else if(800 <= a[i] && a[i] <= 1199){
				color[2] = 1;
			}else if(1200 <= a[i] && a[i] <= 1599){
				color[3] = 1;
			}else if(1600 <= a[i] && a[i] <= 1999){
				color[4] = 1;
			}else if(2000 <= a[i] && a[i] <= 2399){
				color[5] = 1;
			}else if(2400 <= a[i] && a[i] <= 2799){
				color[6] = 1;
			}else if(2800 <= a[i] && a[i] <= 3199){
				color[7] = 1;
			}else if(3200 <= a[i]){
				count2 += 1;
			}
		} {
			if(1 <= a[i] && a[i] <= 399){
				color[0] = 1;
			}else if(400 <= a[i] && a[i] <= 799){
				color[1] = 1;
			}else if(800 <= a[i] && a[i] <= 1199){
				color[2] = 1;
			}else if(1200 <= a[i] && a[i] <= 1599){
				color[3] = 1;
			}else if(1600 <= a[i] && a[i] <= 1999){
				color[4] = 1;
			}else if(2000 <= a[i] && a[i] <= 2399){
				color[5] = 1;
			}else if(2400 <= a[i] && a[i] <= 2799){
				color[6] = 1;
			}else if(2800 <= a[i] && a[i] <= 3199){
				color[7] = 1;
			}else if(3200 <= a[i]){
				count2 += 1;
			}
		} if(1 <= a[i] && a[i] <= 399){
				color[0] = 1;
			}else if(400 <= a[i] && a[i] <= 799){
				color[1] = 1;
			}else if(800 <= a[i] && a[i] <= 1199){
				color[2] = 1;
			}else if(1200 <= a[i] && a[i] <= 1599){
				color[3] = 1;
			}else if(1600 <= a[i] && a[i] <= 1999){
				color[4] = 1;
			}else if(2000 <= a[i] && a[i] <= 2399){
				color[5] = 1;
			}else if(2400 <= a[i] && a[i] <= 2799){
				color[6] = 1;
			}else if(2800 <= a[i] && a[i] <= 3199){
				color[7] = 1;
			}else if(3200 <= a[i]){
				count2 += 1;
			} 1 <= a[i] && a[i] <= 399 1 <= a[i] 1 a[i] a i a[i] <= 399 a[i] a i 399 {
				color[0] = 1;
			} color[0] = 1 color[0] color 0 1 if(400 <= a[i] && a[i] <= 799){
				color[1] = 1;
			}else if(800 <= a[i] && a[i] <= 1199){
				color[2] = 1;
			}else if(1200 <= a[i] && a[i] <= 1599){
				color[3] = 1;
			}else if(1600 <= a[i] && a[i] <= 1999){
				color[4] = 1;
			}else if(2000 <= a[i] && a[i] <= 2399){
				color[5] = 1;
			}else if(2400 <= a[i] && a[i] <= 2799){
				color[6] = 1;
			}else if(2800 <= a[i] && a[i] <= 3199){
				color[7] = 1;
			}else if(3200 <= a[i]){
				count2 += 1;
			} 400 <= a[i] && a[i] <= 799 400 <= a[i] 400 a[i] a i a[i] <= 799 a[i] a i 799 {
				color[1] = 1;
			} color[1] = 1 color[1] color 1 1 if(800 <= a[i] && a[i] <= 1199){
				color[2] = 1;
			}else if(1200 <= a[i] && a[i] <= 1599){
				color[3] = 1;
			}else if(1600 <= a[i] && a[i] <= 1999){
				color[4] = 1;
			}else if(2000 <= a[i] && a[i] <= 2399){
				color[5] = 1;
			}else if(2400 <= a[i] && a[i] <= 2799){
				color[6] = 1;
			}else if(2800 <= a[i] && a[i] <= 3199){
				color[7] = 1;
			}else if(3200 <= a[i]){
				count2 += 1;
			} 800 <= a[i] && a[i] <= 1199 800 <= a[i] 800 a[i] a i a[i] <= 1199 a[i] a i 1199 {
				color[2] = 1;
			} color[2] = 1 color[2] color 2 1 if(1200 <= a[i] && a[i] <= 1599){
				color[3] = 1;
			}else if(1600 <= a[i] && a[i] <= 1999){
				color[4] = 1;
			}else if(2000 <= a[i] && a[i] <= 2399){
				color[5] = 1;
			}else if(2400 <= a[i] && a[i] <= 2799){
				color[6] = 1;
			}else if(2800 <= a[i] && a[i] <= 3199){
				color[7] = 1;
			}else if(3200 <= a[i]){
				count2 += 1;
			} 1200 <= a[i] && a[i] <= 1599 1200 <= a[i] 1200 a[i] a i a[i] <= 1599 a[i] a i 1599 {
				color[3] = 1;
			} color[3] = 1 color[3] color 3 1 if(1600 <= a[i] && a[i] <= 1999){
				color[4] = 1;
			}else if(2000 <= a[i] && a[i] <= 2399){
				color[5] = 1;
			}else if(2400 <= a[i] && a[i] <= 2799){
				color[6] = 1;
			}else if(2800 <= a[i] && a[i] <= 3199){
				color[7] = 1;
			}else if(3200 <= a[i]){
				count2 += 1;
			} 1600 <= a[i] && a[i] <= 1999 1600 <= a[i] 1600 a[i] a i a[i] <= 1999 a[i] a i 1999 {
				color[4] = 1;
			} color[4] = 1 color[4] color 4 1 if(2000 <= a[i] && a[i] <= 2399){
				color[5] = 1;
			}else if(2400 <= a[i] && a[i] <= 2799){
				color[6] = 1;
			}else if(2800 <= a[i] && a[i] <= 3199){
				color[7] = 1;
			}else if(3200 <= a[i]){
				count2 += 1;
			} 2000 <= a[i] && a[i] <= 2399 2000 <= a[i] 2000 a[i] a i a[i] <= 2399 a[i] a i 2399 {
				color[5] = 1;
			} color[5] = 1 color[5] color 5 1 if(2400 <= a[i] && a[i] <= 2799){
				color[6] = 1;
			}else if(2800 <= a[i] && a[i] <= 3199){
				color[7] = 1;
			}else if(3200 <= a[i]){
				count2 += 1;
			} 2400 <= a[i] && a[i] <= 2799 2400 <= a[i] 2400 a[i] a i a[i] <= 2799 a[i] a i 2799 {
				color[6] = 1;
			} color[6] = 1 color[6] color 6 1 if(2800 <= a[i] && a[i] <= 3199){
				color[7] = 1;
			}else if(3200 <= a[i]){
				count2 += 1;
			} 2800 <= a[i] && a[i] <= 3199 2800 <= a[i] 2800 a[i] a i a[i] <= 3199 a[i] a i 3199 {
				color[7] = 1;
			} color[7] = 1 color[7] color 7 1 if(3200 <= a[i]){
				count2 += 1;
			} 3200 <= a[i] 3200 a[i] a i {
				count2 += 1;
			} count2 += 1 count2 1 for(int i = 0;i < 8;i++){
			if(color[i] != 0){
				count1 += 1;
				count2 += 1;
			}
		} int i = 0; int i = 0; i 0 i < 8 i 8 i++ i++ i {
			if(color[i] != 0){
				count1 += 1;
				count2 += 1;
			}
		} {
			if(color[i] != 0){
				count1 += 1;
				count2 += 1;
			}
		} if(color[i] != 0){
				count1 += 1;
				count2 += 1;
			} color[i] != 0 color[i] color i 0 {
				count1 += 1;
				count2 += 1;
			} count1 += 1 count1 1 count2 += 1 count2 1 if(count1 == 0){
			count1 += 1;
		} count1 == 0 count1 0 {
			count1 += 1;
		} count1 += 1 count1 1 System.out.println(String.valueOf(count1) + " " + String.valueOf(count2)) System.out.println System.out System System.out String.valueOf(count1) + " " + String.valueOf(count2) String.valueOf(count1) + " " + String.valueOf(count2) String.valueOf(count1) String.valueOf String count1 " " String.valueOf(count2) String.valueOf String count2 String[] args args
import java.io.BufferedReader;
import java.io.InputStreamReader;



class Main{

	public static void main(String[] args) throws Exception {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		int n = Integer.parseInt(br.readLine());
		String[] input = br.readLine().split(" ");
		int[] a = new int[n];
		for(int i = 0;i < n;i++){
			a[i] = Integer.parseInt(input[i]);
		}
		int[] color = new int[8];
		int count1 = 0;
		int count2 = 0;
		for(int i = 0;i < n;i++){
			if(1 <= a[i] && a[i] <= 399){
				color[0] = 1;
			}else if(400 <= a[i] && a[i] <= 799){
				color[1] = 1;
			}else if(800 <= a[i] && a[i] <= 1199){
				color[2] = 1;
			}else if(1200 <= a[i] && a[i] <= 1599){
				color[3] = 1;
			}else if(1600 <= a[i] && a[i] <= 1999){
				color[4] = 1;
			}else if(2000 <= a[i] && a[i] <= 2399){
				color[5] = 1;
			}else if(2400 <= a[i] && a[i] <= 2799){
				color[6] = 1;
			}else if(2800 <= a[i] && a[i] <= 3199){
				color[7] = 1;
			}else if(3200 <= a[i]){
				count2 += 1;
			}
		}
		for(int i = 0;i < 8;i++){
			if(color[i] != 0){
				count1 += 1;
				count2 += 1;
			}
		}
		if(count1 == 0){
			count1 += 1;
		}
		System.out.println(String.valueOf(count1) + " " + String.valueOf(count2));

	}

}