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

public class Main {
	public static void solveColorfulLeaderboard() throws IOException {
		int n;
		int cntColor = 0;
		int cntOverRed = 0;
		boolean red = false;
		boolean orange = false;
		boolean yellow = false;
		boolean blue = false;
		boolean sky = false;
		boolean green = false;
		boolean brown = false;
		boolean grey = false;
		int ai;

		String line;
		String[] split;
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		line = br.readLine();
		n = Integer.parseInt(line);
		line = br.readLine();
		split = line.split(" ");

		for (int i = 0; i < n; i++) {
			ai = Integer.parseInt(split[i]);
			if (1 <= ai && ai <= 399 && grey == false) {
				grey = true;
				cntColor++;
			} else if (400 <= ai && ai <= 799 && brown == false) {
				brown = true;
				cntColor++;
			} else if (800 <= ai && ai <= 1199 && green == false) {
				green = true;
				cntColor++;
			} else if (1200 <= ai && ai <= 1599 && sky == false) {
				sky = true;
				cntColor++;
			} else if (1600 <= ai && ai <= 1999 && blue == false) {
				blue = true;
				cntColor++;
			} else if (2000 <= ai && ai <= 2399 && yellow == false) {
				yellow = true;
				cntColor++;
			} else if (2400 <= ai && ai <= 2799 && orange == false) {
				orange = true;
				cntColor++;
			} else if (2800 <= ai && ai <= 3199 && red == false) {
				red = true;
				cntColor++;
			} else if (3200 <= ai) {
				cntOverRed++;
			}
		}
		System.out.println(Math.max(cntColor, 1) + " " + (cntColor + cntOverRed));

		br.close();
	}

	public static void main(String[] args) {
		try {
			solveColorfulLeaderboard();
		} catch (IOException e) {
			e.printStackTrace();
		}
	}
} import java.io.BufferedReader; BufferedReader java.io import java.io.IOException; IOException java.io import java.io.InputStreamReader; InputStreamReader java.io public class Main {
	public static void solveColorfulLeaderboard() throws IOException {
		int n;
		int cntColor = 0;
		int cntOverRed = 0;
		boolean red = false;
		boolean orange = false;
		boolean yellow = false;
		boolean blue = false;
		boolean sky = false;
		boolean green = false;
		boolean brown = false;
		boolean grey = false;
		int ai;

		String line;
		String[] split;
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		line = br.readLine();
		n = Integer.parseInt(line);
		line = br.readLine();
		split = line.split(" ");

		for (int i = 0; i < n; i++) {
			ai = Integer.parseInt(split[i]);
			if (1 <= ai && ai <= 399 && grey == false) {
				grey = true;
				cntColor++;
			} else if (400 <= ai && ai <= 799 && brown == false) {
				brown = true;
				cntColor++;
			} else if (800 <= ai && ai <= 1199 && green == false) {
				green = true;
				cntColor++;
			} else if (1200 <= ai && ai <= 1599 && sky == false) {
				sky = true;
				cntColor++;
			} else if (1600 <= ai && ai <= 1999 && blue == false) {
				blue = true;
				cntColor++;
			} else if (2000 <= ai && ai <= 2399 && yellow == false) {
				yellow = true;
				cntColor++;
			} else if (2400 <= ai && ai <= 2799 && orange == false) {
				orange = true;
				cntColor++;
			} else if (2800 <= ai && ai <= 3199 && red == false) {
				red = true;
				cntColor++;
			} else if (3200 <= ai) {
				cntOverRed++;
			}
		}
		System.out.println(Math.max(cntColor, 1) + " " + (cntColor + cntOverRed));

		br.close();
	}

	public static void main(String[] args) {
		try {
			solveColorfulLeaderboard();
		} catch (IOException e) {
			e.printStackTrace();
		}
	}
} Main public static void solveColorfulLeaderboard() throws IOException {
		int n;
		int cntColor = 0;
		int cntOverRed = 0;
		boolean red = false;
		boolean orange = false;
		boolean yellow = false;
		boolean blue = false;
		boolean sky = false;
		boolean green = false;
		boolean brown = false;
		boolean grey = false;
		int ai;

		String line;
		String[] split;
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		line = br.readLine();
		n = Integer.parseInt(line);
		line = br.readLine();
		split = line.split(" ");

		for (int i = 0; i < n; i++) {
			ai = Integer.parseInt(split[i]);
			if (1 <= ai && ai <= 399 && grey == false) {
				grey = true;
				cntColor++;
			} else if (400 <= ai && ai <= 799 && brown == false) {
				brown = true;
				cntColor++;
			} else if (800 <= ai && ai <= 1199 && green == false) {
				green = true;
				cntColor++;
			} else if (1200 <= ai && ai <= 1599 && sky == false) {
				sky = true;
				cntColor++;
			} else if (1600 <= ai && ai <= 1999 && blue == false) {
				blue = true;
				cntColor++;
			} else if (2000 <= ai && ai <= 2399 && yellow == false) {
				yellow = true;
				cntColor++;
			} else if (2400 <= ai && ai <= 2799 && orange == false) {
				orange = true;
				cntColor++;
			} else if (2800 <= ai && ai <= 3199 && red == false) {
				red = true;
				cntColor++;
			} else if (3200 <= ai) {
				cntOverRed++;
			}
		}
		System.out.println(Math.max(cntColor, 1) + " " + (cntColor + cntOverRed));

		br.close();
	} solveColorfulLeaderboard {
		int n;
		int cntColor = 0;
		int cntOverRed = 0;
		boolean red = false;
		boolean orange = false;
		boolean yellow = false;
		boolean blue = false;
		boolean sky = false;
		boolean green = false;
		boolean brown = false;
		boolean grey = false;
		int ai;

		String line;
		String[] split;
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		line = br.readLine();
		n = Integer.parseInt(line);
		line = br.readLine();
		split = line.split(" ");

		for (int i = 0; i < n; i++) {
			ai = Integer.parseInt(split[i]);
			if (1 <= ai && ai <= 399 && grey == false) {
				grey = true;
				cntColor++;
			} else if (400 <= ai && ai <= 799 && brown == false) {
				brown = true;
				cntColor++;
			} else if (800 <= ai && ai <= 1199 && green == false) {
				green = true;
				cntColor++;
			} else if (1200 <= ai && ai <= 1599 && sky == false) {
				sky = true;
				cntColor++;
			} else if (1600 <= ai && ai <= 1999 && blue == false) {
				blue = true;
				cntColor++;
			} else if (2000 <= ai && ai <= 2399 && yellow == false) {
				yellow = true;
				cntColor++;
			} else if (2400 <= ai && ai <= 2799 && orange == false) {
				orange = true;
				cntColor++;
			} else if (2800 <= ai && ai <= 3199 && red == false) {
				red = true;
				cntColor++;
			} else if (3200 <= ai) {
				cntOverRed++;
			}
		}
		System.out.println(Math.max(cntColor, 1) + " " + (cntColor + cntOverRed));

		br.close();
	} int n; n int cntColor = 0; cntColor 0 int cntOverRed = 0; cntOverRed 0 boolean red = false; red false boolean orange = false; orange false boolean yellow = false; yellow false boolean blue = false; blue false boolean sky = false; sky false boolean green = false; green false boolean brown = false; brown false boolean grey = false; grey false int ai; ai String line; line String[] split; split BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); br new BufferedReader(new InputStreamReader(System.in)) line = br.readLine() line br.readLine() br.readLine br n = Integer.parseInt(line) n Integer.parseInt(line) Integer.parseInt Integer line line = br.readLine() line br.readLine() br.readLine br split = line.split(" ") split line.split(" ") line.split line " " for (int i = 0; i < n; i++) {
			ai = Integer.parseInt(split[i]);
			if (1 <= ai && ai <= 399 && grey == false) {
				grey = true;
				cntColor++;
			} else if (400 <= ai && ai <= 799 && brown == false) {
				brown = true;
				cntColor++;
			} else if (800 <= ai && ai <= 1199 && green == false) {
				green = true;
				cntColor++;
			} else if (1200 <= ai && ai <= 1599 && sky == false) {
				sky = true;
				cntColor++;
			} else if (1600 <= ai && ai <= 1999 && blue == false) {
				blue = true;
				cntColor++;
			} else if (2000 <= ai && ai <= 2399 && yellow == false) {
				yellow = true;
				cntColor++;
			} else if (2400 <= ai && ai <= 2799 && orange == false) {
				orange = true;
				cntColor++;
			} else if (2800 <= ai && ai <= 3199 && red == false) {
				red = true;
				cntColor++;
			} else if (3200 <= ai) {
				cntOverRed++;
			}
		} int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
			ai = Integer.parseInt(split[i]);
			if (1 <= ai && ai <= 399 && grey == false) {
				grey = true;
				cntColor++;
			} else if (400 <= ai && ai <= 799 && brown == false) {
				brown = true;
				cntColor++;
			} else if (800 <= ai && ai <= 1199 && green == false) {
				green = true;
				cntColor++;
			} else if (1200 <= ai && ai <= 1599 && sky == false) {
				sky = true;
				cntColor++;
			} else if (1600 <= ai && ai <= 1999 && blue == false) {
				blue = true;
				cntColor++;
			} else if (2000 <= ai && ai <= 2399 && yellow == false) {
				yellow = true;
				cntColor++;
			} else if (2400 <= ai && ai <= 2799 && orange == false) {
				orange = true;
				cntColor++;
			} else if (2800 <= ai && ai <= 3199 && red == false) {
				red = true;
				cntColor++;
			} else if (3200 <= ai) {
				cntOverRed++;
			}
		} {
			ai = Integer.parseInt(split[i]);
			if (1 <= ai && ai <= 399 && grey == false) {
				grey = true;
				cntColor++;
			} else if (400 <= ai && ai <= 799 && brown == false) {
				brown = true;
				cntColor++;
			} else if (800 <= ai && ai <= 1199 && green == false) {
				green = true;
				cntColor++;
			} else if (1200 <= ai && ai <= 1599 && sky == false) {
				sky = true;
				cntColor++;
			} else if (1600 <= ai && ai <= 1999 && blue == false) {
				blue = true;
				cntColor++;
			} else if (2000 <= ai && ai <= 2399 && yellow == false) {
				yellow = true;
				cntColor++;
			} else if (2400 <= ai && ai <= 2799 && orange == false) {
				orange = true;
				cntColor++;
			} else if (2800 <= ai && ai <= 3199 && red == false) {
				red = true;
				cntColor++;
			} else if (3200 <= ai) {
				cntOverRed++;
			}
		} ai = Integer.parseInt(split[i]) ai Integer.parseInt(split[i]) Integer.parseInt Integer split[i] split i if (1 <= ai && ai <= 399 && grey == false) {
				grey = true;
				cntColor++;
			} else if (400 <= ai && ai <= 799 && brown == false) {
				brown = true;
				cntColor++;
			} else if (800 <= ai && ai <= 1199 && green == false) {
				green = true;
				cntColor++;
			} else if (1200 <= ai && ai <= 1599 && sky == false) {
				sky = true;
				cntColor++;
			} else if (1600 <= ai && ai <= 1999 && blue == false) {
				blue = true;
				cntColor++;
			} else if (2000 <= ai && ai <= 2399 && yellow == false) {
				yellow = true;
				cntColor++;
			} else if (2400 <= ai && ai <= 2799 && orange == false) {
				orange = true;
				cntColor++;
			} else if (2800 <= ai && ai <= 3199 && red == false) {
				red = true;
				cntColor++;
			} else if (3200 <= ai) {
				cntOverRed++;
			} 1 <= ai && ai <= 399 && grey == false 1 <= ai && ai <= 399 && grey == false 1 <= ai 1 ai ai <= 399 ai 399 grey == false grey false {
				grey = true;
				cntColor++;
			} grey = true grey true cntColor++ cntColor if (400 <= ai && ai <= 799 && brown == false) {
				brown = true;
				cntColor++;
			} else if (800 <= ai && ai <= 1199 && green == false) {
				green = true;
				cntColor++;
			} else if (1200 <= ai && ai <= 1599 && sky == false) {
				sky = true;
				cntColor++;
			} else if (1600 <= ai && ai <= 1999 && blue == false) {
				blue = true;
				cntColor++;
			} else if (2000 <= ai && ai <= 2399 && yellow == false) {
				yellow = true;
				cntColor++;
			} else if (2400 <= ai && ai <= 2799 && orange == false) {
				orange = true;
				cntColor++;
			} else if (2800 <= ai && ai <= 3199 && red == false) {
				red = true;
				cntColor++;
			} else if (3200 <= ai) {
				cntOverRed++;
			} 400 <= ai && ai <= 799 && brown == false 400 <= ai && ai <= 799 && brown == false 400 <= ai 400 ai ai <= 799 ai 799 brown == false brown false {
				brown = true;
				cntColor++;
			} brown = true brown true cntColor++ cntColor if (800 <= ai && ai <= 1199 && green == false) {
				green = true;
				cntColor++;
			} else if (1200 <= ai && ai <= 1599 && sky == false) {
				sky = true;
				cntColor++;
			} else if (1600 <= ai && ai <= 1999 && blue == false) {
				blue = true;
				cntColor++;
			} else if (2000 <= ai && ai <= 2399 && yellow == false) {
				yellow = true;
				cntColor++;
			} else if (2400 <= ai && ai <= 2799 && orange == false) {
				orange = true;
				cntColor++;
			} else if (2800 <= ai && ai <= 3199 && red == false) {
				red = true;
				cntColor++;
			} else if (3200 <= ai) {
				cntOverRed++;
			} 800 <= ai && ai <= 1199 && green == false 800 <= ai && ai <= 1199 && green == false 800 <= ai 800 ai ai <= 1199 ai 1199 green == false green false {
				green = true;
				cntColor++;
			} green = true green true cntColor++ cntColor if (1200 <= ai && ai <= 1599 && sky == false) {
				sky = true;
				cntColor++;
			} else if (1600 <= ai && ai <= 1999 && blue == false) {
				blue = true;
				cntColor++;
			} else if (2000 <= ai && ai <= 2399 && yellow == false) {
				yellow = true;
				cntColor++;
			} else if (2400 <= ai && ai <= 2799 && orange == false) {
				orange = true;
				cntColor++;
			} else if (2800 <= ai && ai <= 3199 && red == false) {
				red = true;
				cntColor++;
			} else if (3200 <= ai) {
				cntOverRed++;
			} 1200 <= ai && ai <= 1599 && sky == false 1200 <= ai && ai <= 1599 && sky == false 1200 <= ai 1200 ai ai <= 1599 ai 1599 sky == false sky false {
				sky = true;
				cntColor++;
			} sky = true sky true cntColor++ cntColor if (1600 <= ai && ai <= 1999 && blue == false) {
				blue = true;
				cntColor++;
			} else if (2000 <= ai && ai <= 2399 && yellow == false) {
				yellow = true;
				cntColor++;
			} else if (2400 <= ai && ai <= 2799 && orange == false) {
				orange = true;
				cntColor++;
			} else if (2800 <= ai && ai <= 3199 && red == false) {
				red = true;
				cntColor++;
			} else if (3200 <= ai) {
				cntOverRed++;
			} 1600 <= ai && ai <= 1999 && blue == false 1600 <= ai && ai <= 1999 && blue == false 1600 <= ai 1600 ai ai <= 1999 ai 1999 blue == false blue false {
				blue = true;
				cntColor++;
			} blue = true blue true cntColor++ cntColor if (2000 <= ai && ai <= 2399 && yellow == false) {
				yellow = true;
				cntColor++;
			} else if (2400 <= ai && ai <= 2799 && orange == false) {
				orange = true;
				cntColor++;
			} else if (2800 <= ai && ai <= 3199 && red == false) {
				red = true;
				cntColor++;
			} else if (3200 <= ai) {
				cntOverRed++;
			} 2000 <= ai && ai <= 2399 && yellow == false 2000 <= ai && ai <= 2399 && yellow == false 2000 <= ai 2000 ai ai <= 2399 ai 2399 yellow == false yellow false {
				yellow = true;
				cntColor++;
			} yellow = true yellow true cntColor++ cntColor if (2400 <= ai && ai <= 2799 && orange == false) {
				orange = true;
				cntColor++;
			} else if (2800 <= ai && ai <= 3199 && red == false) {
				red = true;
				cntColor++;
			} else if (3200 <= ai) {
				cntOverRed++;
			} 2400 <= ai && ai <= 2799 && orange == false 2400 <= ai && ai <= 2799 && orange == false 2400 <= ai 2400 ai ai <= 2799 ai 2799 orange == false orange false {
				orange = true;
				cntColor++;
			} orange = true orange true cntColor++ cntColor if (2800 <= ai && ai <= 3199 && red == false) {
				red = true;
				cntColor++;
			} else if (3200 <= ai) {
				cntOverRed++;
			} 2800 <= ai && ai <= 3199 && red == false 2800 <= ai && ai <= 3199 && red == false 2800 <= ai 2800 ai ai <= 3199 ai 3199 red == false red false {
				red = true;
				cntColor++;
			} red = true red true cntColor++ cntColor if (3200 <= ai) {
				cntOverRed++;
			} 3200 <= ai 3200 ai {
				cntOverRed++;
			} cntOverRed++ cntOverRed System.out.println(Math.max(cntColor, 1) + " " + (cntColor + cntOverRed)) System.out.println System.out System System.out Math.max(cntColor, 1) + " " + (cntColor + cntOverRed) Math.max(cntColor, 1) + " " + (cntColor + cntOverRed) Math.max(cntColor, 1) Math.max Math cntColor 1 " " (cntColor + cntOverRed) cntColor cntOverRed br.close() br.close br public static void main(String[] args) {
		try {
			solveColorfulLeaderboard();
		} catch (IOException e) {
			e.printStackTrace();
		}
	} main {
		try {
			solveColorfulLeaderboard();
		} catch (IOException e) {
			e.printStackTrace();
		}
	} try {
			solveColorfulLeaderboard();
		} catch (IOException e) {
			e.printStackTrace();
		} catch (IOException e) {
			e.printStackTrace();
		} IOException e {
			e.printStackTrace();
		} e.printStackTrace() e.printStackTrace e {
			solveColorfulLeaderboard();
		} solveColorfulLeaderboard() solveColorfulLeaderboard String[] args args public class Main {
	public static void solveColorfulLeaderboard() throws IOException {
		int n;
		int cntColor = 0;
		int cntOverRed = 0;
		boolean red = false;
		boolean orange = false;
		boolean yellow = false;
		boolean blue = false;
		boolean sky = false;
		boolean green = false;
		boolean brown = false;
		boolean grey = false;
		int ai;

		String line;
		String[] split;
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		line = br.readLine();
		n = Integer.parseInt(line);
		line = br.readLine();
		split = line.split(" ");

		for (int i = 0; i < n; i++) {
			ai = Integer.parseInt(split[i]);
			if (1 <= ai && ai <= 399 && grey == false) {
				grey = true;
				cntColor++;
			} else if (400 <= ai && ai <= 799 && brown == false) {
				brown = true;
				cntColor++;
			} else if (800 <= ai && ai <= 1199 && green == false) {
				green = true;
				cntColor++;
			} else if (1200 <= ai && ai <= 1599 && sky == false) {
				sky = true;
				cntColor++;
			} else if (1600 <= ai && ai <= 1999 && blue == false) {
				blue = true;
				cntColor++;
			} else if (2000 <= ai && ai <= 2399 && yellow == false) {
				yellow = true;
				cntColor++;
			} else if (2400 <= ai && ai <= 2799 && orange == false) {
				orange = true;
				cntColor++;
			} else if (2800 <= ai && ai <= 3199 && red == false) {
				red = true;
				cntColor++;
			} else if (3200 <= ai) {
				cntOverRed++;
			}
		}
		System.out.println(Math.max(cntColor, 1) + " " + (cntColor + cntOverRed));

		br.close();
	}

	public static void main(String[] args) {
		try {
			solveColorfulLeaderboard();
		} catch (IOException e) {
			e.printStackTrace();
		}
	}
} public class Main {
	public static void solveColorfulLeaderboard() throws IOException {
		int n;
		int cntColor = 0;
		int cntOverRed = 0;
		boolean red = false;
		boolean orange = false;
		boolean yellow = false;
		boolean blue = false;
		boolean sky = false;
		boolean green = false;
		boolean brown = false;
		boolean grey = false;
		int ai;

		String line;
		String[] split;
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		line = br.readLine();
		n = Integer.parseInt(line);
		line = br.readLine();
		split = line.split(" ");

		for (int i = 0; i < n; i++) {
			ai = Integer.parseInt(split[i]);
			if (1 <= ai && ai <= 399 && grey == false) {
				grey = true;
				cntColor++;
			} else if (400 <= ai && ai <= 799 && brown == false) {
				brown = true;
				cntColor++;
			} else if (800 <= ai && ai <= 1199 && green == false) {
				green = true;
				cntColor++;
			} else if (1200 <= ai && ai <= 1599 && sky == false) {
				sky = true;
				cntColor++;
			} else if (1600 <= ai && ai <= 1999 && blue == false) {
				blue = true;
				cntColor++;
			} else if (2000 <= ai && ai <= 2399 && yellow == false) {
				yellow = true;
				cntColor++;
			} else if (2400 <= ai && ai <= 2799 && orange == false) {
				orange = true;
				cntColor++;
			} else if (2800 <= ai && ai <= 3199 && red == false) {
				red = true;
				cntColor++;
			} else if (3200 <= ai) {
				cntOverRed++;
			}
		}
		System.out.println(Math.max(cntColor, 1) + " " + (cntColor + cntOverRed));

		br.close();
	}

	public static void main(String[] args) {
		try {
			solveColorfulLeaderboard();
		} catch (IOException e) {
			e.printStackTrace();
		}
	}
} Main

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

public class Main {
	public static void solveColorfulLeaderboard() throws IOException {
		int n;
		int cntColor = 0;
		int cntOverRed = 0;
		boolean red = false;
		boolean orange = false;
		boolean yellow = false;
		boolean blue = false;
		boolean sky = false;
		boolean green = false;
		boolean brown = false;
		boolean grey = false;
		int ai;

		String line;
		String[] split;
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		line = br.readLine();
		n = Integer.parseInt(line);
		line = br.readLine();
		split = line.split(" ");

		for (int i = 0; i < n; i++) {
			ai = Integer.parseInt(split[i]);
			if (1 <= ai && ai <= 399 && grey == false) {
				grey = true;
				cntColor++;
			} else if (400 <= ai && ai <= 799 && brown == false) {
				brown = true;
				cntColor++;
			} else if (800 <= ai && ai <= 1199 && green == false) {
				green = true;
				cntColor++;
			} else if (1200 <= ai && ai <= 1599 && sky == false) {
				sky = true;
				cntColor++;
			} else if (1600 <= ai && ai <= 1999 && blue == false) {
				blue = true;
				cntColor++;
			} else if (2000 <= ai && ai <= 2399 && yellow == false) {
				yellow = true;
				cntColor++;
			} else if (2400 <= ai && ai <= 2799 && orange == false) {
				orange = true;
				cntColor++;
			} else if (2800 <= ai && ai <= 3199 && red == false) {
				red = true;
				cntColor++;
			} else if (3200 <= ai) {
				cntOverRed++;
			}
		}
		System.out.println(Math.max(cntColor, 1) + " " + (cntColor + cntOverRed));

		br.close();
	}

	public static void main(String[] args) {
		try {
			solveColorfulLeaderboard();
		} catch (IOException e) {
			e.printStackTrace();
		}
	}
}