
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.util.HashSet;
import java.util.InputMismatchException;
import java.util.Set;
import java.util.StringTokenizer;

public class Main {

	public static void main(String[] args) throws IOException {
		InputStream inputStream = System.in;
		OutputStream outputStream = System.out;
		InputReader in = new InputReader(inputStream);
		PrintWriter out = new PrintWriter(outputStream);
		TaskX solver = new TaskX();
		solver.solve(1, in, out);
		out.close();
	}

	static int INF = 1 << 30;
	static int modP = 1000000007;

	static class TaskX {
		static int overRedCount = 0;

		public void solve(int testNumber, InputReader in, PrintWriter out) {

			int n = in.nextInt();
			int[] a = in.nextIntArray(n);
			int[] color = new int[n];
			for (int i = 0; i < n; i++) {
				color[i] = getColor(a[i]);
			}

			Set<Integer> set = new HashSet<>();
			for (int i : color) {
				if (i == 0) continue;
				set.add(i);
			}

			int min = -1, max = -1;
			if (set.size() == 0) {
				min = 1;
				max = overRedCount;
			} else {
				min = set.size();
				max = set.size()+overRedCount;
			}

			out.println(min+" "+max);

		}

		static int getColor(int a) {
			int ret = 0;
			if (1 <= a && a <= 399) {
				ret = 1;
			} else if (400 <= a && a <= 799) {
				ret = 2;
			} else if (800 <= a && a <= 1199) {
				ret = 3;
			} else if (1200 <= a && a <= 1599) {
				ret = 4;
			} else if (1600 <= a && a <= 1999) {
				ret = 5;
			} else if (2000 <= a && a <= 2399) {
				ret = 6;
			} else if (2400 <= a && a <= 2799) {
				ret = 7;
			} else if (2800 <= a && a <= 3199) {
				ret = 8;
			} else if (3200 <= a) {
				overRedCount++;
			}
			return ret;
		}
	}

	static class InputReader {
		BufferedReader in;
		StringTokenizer tok;

		public String nextString() {
			while (!tok.hasMoreTokens()) {
				try {
					tok = new StringTokenizer(in.readLine(), " ");
				} catch (IOException e) {
					throw new InputMismatchException();
				}
			}
			return tok.nextToken();
		}

		public int nextInt() {
			return Integer.parseInt(nextString());
		}

		public long nextLong() {
			return Long.parseLong(nextString());
		}

		public double nextDouble() {
			return Double.parseDouble(nextString());
		}

		public int[] nextIntArray(int n) {
			int[] res = new int[n];
			for (int i = 0; i < n; i++) {
				res[i] = nextInt();
			}
			return res;
		}

		public long[] nextLongArray(int n) {
			long[] res = new long[n];
			for (int i = 0; i < n; i++) {
				res[i] = nextLong();
			}
			return res;
		}

		public InputReader(InputStream inputStream) {
			in = new BufferedReader(new InputStreamReader(inputStream));
			tok = new StringTokenizer("");
		}

	}

} import java.io.BufferedReader; BufferedReader java.io import java.io.IOException; IOException java.io import java.io.InputStream; InputStream java.io import java.io.InputStreamReader; InputStreamReader java.io import java.io.OutputStream; OutputStream java.io import java.io.PrintWriter; PrintWriter java.io import java.util.HashSet; HashSet java.util import java.util.InputMismatchException; InputMismatchException java.util import java.util.Set; Set java.util import java.util.StringTokenizer; StringTokenizer java.util public class Main {

	public static void main(String[] args) throws IOException {
		InputStream inputStream = System.in;
		OutputStream outputStream = System.out;
		InputReader in = new InputReader(inputStream);
		PrintWriter out = new PrintWriter(outputStream);
		TaskX solver = new TaskX();
		solver.solve(1, in, out);
		out.close();
	}

	static int INF = 1 << 30;
	static int modP = 1000000007;

	static class TaskX {
		static int overRedCount = 0;

		public void solve(int testNumber, InputReader in, PrintWriter out) {

			int n = in.nextInt();
			int[] a = in.nextIntArray(n);
			int[] color = new int[n];
			for (int i = 0; i < n; i++) {
				color[i] = getColor(a[i]);
			}

			Set<Integer> set = new HashSet<>();
			for (int i : color) {
				if (i == 0) continue;
				set.add(i);
			}

			int min = -1, max = -1;
			if (set.size() == 0) {
				min = 1;
				max = overRedCount;
			} else {
				min = set.size();
				max = set.size()+overRedCount;
			}

			out.println(min+" "+max);

		}

		static int getColor(int a) {
			int ret = 0;
			if (1 <= a && a <= 399) {
				ret = 1;
			} else if (400 <= a && a <= 799) {
				ret = 2;
			} else if (800 <= a && a <= 1199) {
				ret = 3;
			} else if (1200 <= a && a <= 1599) {
				ret = 4;
			} else if (1600 <= a && a <= 1999) {
				ret = 5;
			} else if (2000 <= a && a <= 2399) {
				ret = 6;
			} else if (2400 <= a && a <= 2799) {
				ret = 7;
			} else if (2800 <= a && a <= 3199) {
				ret = 8;
			} else if (3200 <= a) {
				overRedCount++;
			}
			return ret;
		}
	}

	static class InputReader {
		BufferedReader in;
		StringTokenizer tok;

		public String nextString() {
			while (!tok.hasMoreTokens()) {
				try {
					tok = new StringTokenizer(in.readLine(), " ");
				} catch (IOException e) {
					throw new InputMismatchException();
				}
			}
			return tok.nextToken();
		}

		public int nextInt() {
			return Integer.parseInt(nextString());
		}

		public long nextLong() {
			return Long.parseLong(nextString());
		}

		public double nextDouble() {
			return Double.parseDouble(nextString());
		}

		public int[] nextIntArray(int n) {
			int[] res = new int[n];
			for (int i = 0; i < n; i++) {
				res[i] = nextInt();
			}
			return res;
		}

		public long[] nextLongArray(int n) {
			long[] res = new long[n];
			for (int i = 0; i < n; i++) {
				res[i] = nextLong();
			}
			return res;
		}

		public InputReader(InputStream inputStream) {
			in = new BufferedReader(new InputStreamReader(inputStream));
			tok = new StringTokenizer("");
		}

	}

} Main static int INF = 1 << 30; INF 1 << 30 1 30 static int modP = 1000000007; modP 1000000007 public static void main(String[] args) throws IOException {
		InputStream inputStream = System.in;
		OutputStream outputStream = System.out;
		InputReader in = new InputReader(inputStream);
		PrintWriter out = new PrintWriter(outputStream);
		TaskX solver = new TaskX();
		solver.solve(1, in, out);
		out.close();
	} main {
		InputStream inputStream = System.in;
		OutputStream outputStream = System.out;
		InputReader in = new InputReader(inputStream);
		PrintWriter out = new PrintWriter(outputStream);
		TaskX solver = new TaskX();
		solver.solve(1, in, out);
		out.close();
	} InputStream inputStream = System.in; inputStream System.in System System.in OutputStream outputStream = System.out; outputStream System.out System System.out InputReader in = new InputReader(inputStream); in new InputReader(inputStream) PrintWriter out = new PrintWriter(outputStream); out new PrintWriter(outputStream) TaskX solver = new TaskX(); solver new TaskX() solver.solve(1, in, out) solver.solve solver 1 in out out.close() out.close out String[] args args static class TaskX {
		static int overRedCount = 0;

		public void solve(int testNumber, InputReader in, PrintWriter out) {

			int n = in.nextInt();
			int[] a = in.nextIntArray(n);
			int[] color = new int[n];
			for (int i = 0; i < n; i++) {
				color[i] = getColor(a[i]);
			}

			Set<Integer> set = new HashSet<>();
			for (int i : color) {
				if (i == 0) continue;
				set.add(i);
			}

			int min = -1, max = -1;
			if (set.size() == 0) {
				min = 1;
				max = overRedCount;
			} else {
				min = set.size();
				max = set.size()+overRedCount;
			}

			out.println(min+" "+max);

		}

		static int getColor(int a) {
			int ret = 0;
			if (1 <= a && a <= 399) {
				ret = 1;
			} else if (400 <= a && a <= 799) {
				ret = 2;
			} else if (800 <= a && a <= 1199) {
				ret = 3;
			} else if (1200 <= a && a <= 1599) {
				ret = 4;
			} else if (1600 <= a && a <= 1999) {
				ret = 5;
			} else if (2000 <= a && a <= 2399) {
				ret = 6;
			} else if (2400 <= a && a <= 2799) {
				ret = 7;
			} else if (2800 <= a && a <= 3199) {
				ret = 8;
			} else if (3200 <= a) {
				overRedCount++;
			}
			return ret;
		}
	} TaskX static int overRedCount = 0; overRedCount 0 public void solve(int testNumber, InputReader in, PrintWriter out) {

			int n = in.nextInt();
			int[] a = in.nextIntArray(n);
			int[] color = new int[n];
			for (int i = 0; i < n; i++) {
				color[i] = getColor(a[i]);
			}

			Set<Integer> set = new HashSet<>();
			for (int i : color) {
				if (i == 0) continue;
				set.add(i);
			}

			int min = -1, max = -1;
			if (set.size() == 0) {
				min = 1;
				max = overRedCount;
			} else {
				min = set.size();
				max = set.size()+overRedCount;
			}

			out.println(min+" "+max);

		} solve {

			int n = in.nextInt();
			int[] a = in.nextIntArray(n);
			int[] color = new int[n];
			for (int i = 0; i < n; i++) {
				color[i] = getColor(a[i]);
			}

			Set<Integer> set = new HashSet<>();
			for (int i : color) {
				if (i == 0) continue;
				set.add(i);
			}

			int min = -1, max = -1;
			if (set.size() == 0) {
				min = 1;
				max = overRedCount;
			} else {
				min = set.size();
				max = set.size()+overRedCount;
			}

			out.println(min+" "+max);

		} int n = in.nextInt(); n in.nextInt() in.nextInt in int[] a = in.nextIntArray(n); a in.nextIntArray(n) in.nextIntArray in n int[] color = new int[n]; color new int[n] n for (int i = 0; i < n; i++) {
				color[i] = getColor(a[i]);
			} int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
				color[i] = getColor(a[i]);
			} {
				color[i] = getColor(a[i]);
			} color[i] = getColor(a[i]) color[i] color i getColor(a[i]) getColor a[i] a i Set<Integer> set = new HashSet<>(); set new HashSet<>() for (int i : color) {
				if (i == 0) continue;
				set.add(i);
			} int i color {
				if (i == 0) continue;
				set.add(i);
			} {
				if (i == 0) continue;
				set.add(i);
			} if (i == 0) continue; i == 0 i 0 continue; set.add(i) set.add set i int min = -1 min -1 1 max = -1; max -1 1 if (set.size() == 0) {
				min = 1;
				max = overRedCount;
			} else {
				min = set.size();
				max = set.size()+overRedCount;
			} set.size() == 0 set.size() set.size set 0 {
				min = 1;
				max = overRedCount;
			} min = 1 min 1 max = overRedCount max overRedCount {
				min = set.size();
				max = set.size()+overRedCount;
			} min = set.size() min set.size() set.size set max = set.size()+overRedCount max set.size()+overRedCount set.size() set.size set overRedCount out.println(min+" "+max) out.println out min+" "+max min+" "+max min " " max int testNumber testNumber InputReader in in PrintWriter out out static int getColor(int a) {
			int ret = 0;
			if (1 <= a && a <= 399) {
				ret = 1;
			} else if (400 <= a && a <= 799) {
				ret = 2;
			} else if (800 <= a && a <= 1199) {
				ret = 3;
			} else if (1200 <= a && a <= 1599) {
				ret = 4;
			} else if (1600 <= a && a <= 1999) {
				ret = 5;
			} else if (2000 <= a && a <= 2399) {
				ret = 6;
			} else if (2400 <= a && a <= 2799) {
				ret = 7;
			} else if (2800 <= a && a <= 3199) {
				ret = 8;
			} else if (3200 <= a) {
				overRedCount++;
			}
			return ret;
		} getColor {
			int ret = 0;
			if (1 <= a && a <= 399) {
				ret = 1;
			} else if (400 <= a && a <= 799) {
				ret = 2;
			} else if (800 <= a && a <= 1199) {
				ret = 3;
			} else if (1200 <= a && a <= 1599) {
				ret = 4;
			} else if (1600 <= a && a <= 1999) {
				ret = 5;
			} else if (2000 <= a && a <= 2399) {
				ret = 6;
			} else if (2400 <= a && a <= 2799) {
				ret = 7;
			} else if (2800 <= a && a <= 3199) {
				ret = 8;
			} else if (3200 <= a) {
				overRedCount++;
			}
			return ret;
		} int ret = 0; ret 0 if (1 <= a && a <= 399) {
				ret = 1;
			} else if (400 <= a && a <= 799) {
				ret = 2;
			} else if (800 <= a && a <= 1199) {
				ret = 3;
			} else if (1200 <= a && a <= 1599) {
				ret = 4;
			} else if (1600 <= a && a <= 1999) {
				ret = 5;
			} else if (2000 <= a && a <= 2399) {
				ret = 6;
			} else if (2400 <= a && a <= 2799) {
				ret = 7;
			} else if (2800 <= a && a <= 3199) {
				ret = 8;
			} else if (3200 <= a) {
				overRedCount++;
			} 1 <= a && a <= 399 1 <= a 1 a a <= 399 a 399 {
				ret = 1;
			} ret = 1 ret 1 if (400 <= a && a <= 799) {
				ret = 2;
			} else if (800 <= a && a <= 1199) {
				ret = 3;
			} else if (1200 <= a && a <= 1599) {
				ret = 4;
			} else if (1600 <= a && a <= 1999) {
				ret = 5;
			} else if (2000 <= a && a <= 2399) {
				ret = 6;
			} else if (2400 <= a && a <= 2799) {
				ret = 7;
			} else if (2800 <= a && a <= 3199) {
				ret = 8;
			} else if (3200 <= a) {
				overRedCount++;
			} 400 <= a && a <= 799 400 <= a 400 a a <= 799 a 799 {
				ret = 2;
			} ret = 2 ret 2 if (800 <= a && a <= 1199) {
				ret = 3;
			} else if (1200 <= a && a <= 1599) {
				ret = 4;
			} else if (1600 <= a && a <= 1999) {
				ret = 5;
			} else if (2000 <= a && a <= 2399) {
				ret = 6;
			} else if (2400 <= a && a <= 2799) {
				ret = 7;
			} else if (2800 <= a && a <= 3199) {
				ret = 8;
			} else if (3200 <= a) {
				overRedCount++;
			} 800 <= a && a <= 1199 800 <= a 800 a a <= 1199 a 1199 {
				ret = 3;
			} ret = 3 ret 3 if (1200 <= a && a <= 1599) {
				ret = 4;
			} else if (1600 <= a && a <= 1999) {
				ret = 5;
			} else if (2000 <= a && a <= 2399) {
				ret = 6;
			} else if (2400 <= a && a <= 2799) {
				ret = 7;
			} else if (2800 <= a && a <= 3199) {
				ret = 8;
			} else if (3200 <= a) {
				overRedCount++;
			} 1200 <= a && a <= 1599 1200 <= a 1200 a a <= 1599 a 1599 {
				ret = 4;
			} ret = 4 ret 4 if (1600 <= a && a <= 1999) {
				ret = 5;
			} else if (2000 <= a && a <= 2399) {
				ret = 6;
			} else if (2400 <= a && a <= 2799) {
				ret = 7;
			} else if (2800 <= a && a <= 3199) {
				ret = 8;
			} else if (3200 <= a) {
				overRedCount++;
			} 1600 <= a && a <= 1999 1600 <= a 1600 a a <= 1999 a 1999 {
				ret = 5;
			} ret = 5 ret 5 if (2000 <= a && a <= 2399) {
				ret = 6;
			} else if (2400 <= a && a <= 2799) {
				ret = 7;
			} else if (2800 <= a && a <= 3199) {
				ret = 8;
			} else if (3200 <= a) {
				overRedCount++;
			} 2000 <= a && a <= 2399 2000 <= a 2000 a a <= 2399 a 2399 {
				ret = 6;
			} ret = 6 ret 6 if (2400 <= a && a <= 2799) {
				ret = 7;
			} else if (2800 <= a && a <= 3199) {
				ret = 8;
			} else if (3200 <= a) {
				overRedCount++;
			} 2400 <= a && a <= 2799 2400 <= a 2400 a a <= 2799 a 2799 {
				ret = 7;
			} ret = 7 ret 7 if (2800 <= a && a <= 3199) {
				ret = 8;
			} else if (3200 <= a) {
				overRedCount++;
			} 2800 <= a && a <= 3199 2800 <= a 2800 a a <= 3199 a 3199 {
				ret = 8;
			} ret = 8 ret 8 if (3200 <= a) {
				overRedCount++;
			} 3200 <= a 3200 a {
				overRedCount++;
			} overRedCount++ overRedCount return ret; ret int a a static class InputReader {
		BufferedReader in;
		StringTokenizer tok;

		public String nextString() {
			while (!tok.hasMoreTokens()) {
				try {
					tok = new StringTokenizer(in.readLine(), " ");
				} catch (IOException e) {
					throw new InputMismatchException();
				}
			}
			return tok.nextToken();
		}

		public int nextInt() {
			return Integer.parseInt(nextString());
		}

		public long nextLong() {
			return Long.parseLong(nextString());
		}

		public double nextDouble() {
			return Double.parseDouble(nextString());
		}

		public int[] nextIntArray(int n) {
			int[] res = new int[n];
			for (int i = 0; i < n; i++) {
				res[i] = nextInt();
			}
			return res;
		}

		public long[] nextLongArray(int n) {
			long[] res = new long[n];
			for (int i = 0; i < n; i++) {
				res[i] = nextLong();
			}
			return res;
		}

		public InputReader(InputStream inputStream) {
			in = new BufferedReader(new InputStreamReader(inputStream));
			tok = new StringTokenizer("");
		}

	} InputReader BufferedReader in; in StringTokenizer tok; tok public String nextString() {
			while (!tok.hasMoreTokens()) {
				try {
					tok = new StringTokenizer(in.readLine(), " ");
				} catch (IOException e) {
					throw new InputMismatchException();
				}
			}
			return tok.nextToken();
		} nextString {
			while (!tok.hasMoreTokens()) {
				try {
					tok = new StringTokenizer(in.readLine(), " ");
				} catch (IOException e) {
					throw new InputMismatchException();
				}
			}
			return tok.nextToken();
		} while (!tok.hasMoreTokens()) {
				try {
					tok = new StringTokenizer(in.readLine(), " ");
				} catch (IOException e) {
					throw new InputMismatchException();
				}
			} !tok.hasMoreTokens() tok.hasMoreTokens() tok.hasMoreTokens tok {
				try {
					tok = new StringTokenizer(in.readLine(), " ");
				} catch (IOException e) {
					throw new InputMismatchException();
				}
			} try {
					tok = new StringTokenizer(in.readLine(), " ");
				} catch (IOException e) {
					throw new InputMismatchException();
				} catch (IOException e) {
					throw new InputMismatchException();
				} IOException e {
					throw new InputMismatchException();
				} throw new InputMismatchException(); new InputMismatchException() {
					tok = new StringTokenizer(in.readLine(), " ");
				} tok = new StringTokenizer(in.readLine(), " ") tok new StringTokenizer(in.readLine(), " ") return tok.nextToken(); tok.nextToken() tok.nextToken tok public int nextInt() {
			return Integer.parseInt(nextString());
		} nextInt {
			return Integer.parseInt(nextString());
		} return Integer.parseInt(nextString()); Integer.parseInt(nextString()) Integer.parseInt Integer nextString() nextString public long nextLong() {
			return Long.parseLong(nextString());
		} nextLong {
			return Long.parseLong(nextString());
		} return Long.parseLong(nextString()); Long.parseLong(nextString()) Long.parseLong Long nextString() nextString public double nextDouble() {
			return Double.parseDouble(nextString());
		} nextDouble {
			return Double.parseDouble(nextString());
		} return Double.parseDouble(nextString()); Double.parseDouble(nextString()) Double.parseDouble Double nextString() nextString public int[] nextIntArray(int n) {
			int[] res = new int[n];
			for (int i = 0; i < n; i++) {
				res[i] = nextInt();
			}
			return res;
		} nextIntArray {
			int[] res = new int[n];
			for (int i = 0; i < n; i++) {
				res[i] = nextInt();
			}
			return res;
		} int[] res = new int[n]; res new int[n] n for (int i = 0; i < n; i++) {
				res[i] = nextInt();
			} int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
				res[i] = nextInt();
			} {
				res[i] = nextInt();
			} res[i] = nextInt() res[i] res i nextInt() nextInt return res; res int n n public long[] nextLongArray(int n) {
			long[] res = new long[n];
			for (int i = 0; i < n; i++) {
				res[i] = nextLong();
			}
			return res;
		} nextLongArray {
			long[] res = new long[n];
			for (int i = 0; i < n; i++) {
				res[i] = nextLong();
			}
			return res;
		} long[] res = new long[n]; res new long[n] n for (int i = 0; i < n; i++) {
				res[i] = nextLong();
			} int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
				res[i] = nextLong();
			} {
				res[i] = nextLong();
			} res[i] = nextLong() res[i] res i nextLong() nextLong return res; res int n n public InputReader(InputStream inputStream) {
			in = new BufferedReader(new InputStreamReader(inputStream));
			tok = new StringTokenizer("");
		} InputReader {
			in = new BufferedReader(new InputStreamReader(inputStream));
			tok = new StringTokenizer("");
		} in = new BufferedReader(new InputStreamReader(inputStream)) in new BufferedReader(new InputStreamReader(inputStream)) tok = new StringTokenizer("") tok new StringTokenizer("") InputStream inputStream inputStream public class Main {

	public static void main(String[] args) throws IOException {
		InputStream inputStream = System.in;
		OutputStream outputStream = System.out;
		InputReader in = new InputReader(inputStream);
		PrintWriter out = new PrintWriter(outputStream);
		TaskX solver = new TaskX();
		solver.solve(1, in, out);
		out.close();
	}

	static int INF = 1 << 30;
	static int modP = 1000000007;

	static class TaskX {
		static int overRedCount = 0;

		public void solve(int testNumber, InputReader in, PrintWriter out) {

			int n = in.nextInt();
			int[] a = in.nextIntArray(n);
			int[] color = new int[n];
			for (int i = 0; i < n; i++) {
				color[i] = getColor(a[i]);
			}

			Set<Integer> set = new HashSet<>();
			for (int i : color) {
				if (i == 0) continue;
				set.add(i);
			}

			int min = -1, max = -1;
			if (set.size() == 0) {
				min = 1;
				max = overRedCount;
			} else {
				min = set.size();
				max = set.size()+overRedCount;
			}

			out.println(min+" "+max);

		}

		static int getColor(int a) {
			int ret = 0;
			if (1 <= a && a <= 399) {
				ret = 1;
			} else if (400 <= a && a <= 799) {
				ret = 2;
			} else if (800 <= a && a <= 1199) {
				ret = 3;
			} else if (1200 <= a && a <= 1599) {
				ret = 4;
			} else if (1600 <= a && a <= 1999) {
				ret = 5;
			} else if (2000 <= a && a <= 2399) {
				ret = 6;
			} else if (2400 <= a && a <= 2799) {
				ret = 7;
			} else if (2800 <= a && a <= 3199) {
				ret = 8;
			} else if (3200 <= a) {
				overRedCount++;
			}
			return ret;
		}
	}

	static class InputReader {
		BufferedReader in;
		StringTokenizer tok;

		public String nextString() {
			while (!tok.hasMoreTokens()) {
				try {
					tok = new StringTokenizer(in.readLine(), " ");
				} catch (IOException e) {
					throw new InputMismatchException();
				}
			}
			return tok.nextToken();
		}

		public int nextInt() {
			return Integer.parseInt(nextString());
		}

		public long nextLong() {
			return Long.parseLong(nextString());
		}

		public double nextDouble() {
			return Double.parseDouble(nextString());
		}

		public int[] nextIntArray(int n) {
			int[] res = new int[n];
			for (int i = 0; i < n; i++) {
				res[i] = nextInt();
			}
			return res;
		}

		public long[] nextLongArray(int n) {
			long[] res = new long[n];
			for (int i = 0; i < n; i++) {
				res[i] = nextLong();
			}
			return res;
		}

		public InputReader(InputStream inputStream) {
			in = new BufferedReader(new InputStreamReader(inputStream));
			tok = new StringTokenizer("");
		}

	}

} public class Main {

	public static void main(String[] args) throws IOException {
		InputStream inputStream = System.in;
		OutputStream outputStream = System.out;
		InputReader in = new InputReader(inputStream);
		PrintWriter out = new PrintWriter(outputStream);
		TaskX solver = new TaskX();
		solver.solve(1, in, out);
		out.close();
	}

	static int INF = 1 << 30;
	static int modP = 1000000007;

	static class TaskX {
		static int overRedCount = 0;

		public void solve(int testNumber, InputReader in, PrintWriter out) {

			int n = in.nextInt();
			int[] a = in.nextIntArray(n);
			int[] color = new int[n];
			for (int i = 0; i < n; i++) {
				color[i] = getColor(a[i]);
			}

			Set<Integer> set = new HashSet<>();
			for (int i : color) {
				if (i == 0) continue;
				set.add(i);
			}

			int min = -1, max = -1;
			if (set.size() == 0) {
				min = 1;
				max = overRedCount;
			} else {
				min = set.size();
				max = set.size()+overRedCount;
			}

			out.println(min+" "+max);

		}

		static int getColor(int a) {
			int ret = 0;
			if (1 <= a && a <= 399) {
				ret = 1;
			} else if (400 <= a && a <= 799) {
				ret = 2;
			} else if (800 <= a && a <= 1199) {
				ret = 3;
			} else if (1200 <= a && a <= 1599) {
				ret = 4;
			} else if (1600 <= a && a <= 1999) {
				ret = 5;
			} else if (2000 <= a && a <= 2399) {
				ret = 6;
			} else if (2400 <= a && a <= 2799) {
				ret = 7;
			} else if (2800 <= a && a <= 3199) {
				ret = 8;
			} else if (3200 <= a) {
				overRedCount++;
			}
			return ret;
		}
	}

	static class InputReader {
		BufferedReader in;
		StringTokenizer tok;

		public String nextString() {
			while (!tok.hasMoreTokens()) {
				try {
					tok = new StringTokenizer(in.readLine(), " ");
				} catch (IOException e) {
					throw new InputMismatchException();
				}
			}
			return tok.nextToken();
		}

		public int nextInt() {
			return Integer.parseInt(nextString());
		}

		public long nextLong() {
			return Long.parseLong(nextString());
		}

		public double nextDouble() {
			return Double.parseDouble(nextString());
		}

		public int[] nextIntArray(int n) {
			int[] res = new int[n];
			for (int i = 0; i < n; i++) {
				res[i] = nextInt();
			}
			return res;
		}

		public long[] nextLongArray(int n) {
			long[] res = new long[n];
			for (int i = 0; i < n; i++) {
				res[i] = nextLong();
			}
			return res;
		}

		public InputReader(InputStream inputStream) {
			in = new BufferedReader(new InputStreamReader(inputStream));
			tok = new StringTokenizer("");
		}

	}

} Main

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.util.HashSet;
import java.util.InputMismatchException;
import java.util.Set;
import java.util.StringTokenizer;

public class Main {

	public static void main(String[] args) throws IOException {
		InputStream inputStream = System.in;
		OutputStream outputStream = System.out;
		InputReader in = new InputReader(inputStream);
		PrintWriter out = new PrintWriter(outputStream);
		TaskX solver = new TaskX();
		solver.solve(1, in, out);
		out.close();
	}

	static int INF = 1 << 30;
	static int modP = 1000000007;

	static class TaskX {
		static int overRedCount = 0;

		public void solve(int testNumber, InputReader in, PrintWriter out) {

			int n = in.nextInt();
			int[] a = in.nextIntArray(n);
			int[] color = new int[n];
			for (int i = 0; i < n; i++) {
				color[i] = getColor(a[i]);
			}

			Set<Integer> set = new HashSet<>();
			for (int i : color) {
				if (i == 0) continue;
				set.add(i);
			}

			int min = -1, max = -1;
			if (set.size() == 0) {
				min = 1;
				max = overRedCount;
			} else {
				min = set.size();
				max = set.size()+overRedCount;
			}

			out.println(min+" "+max);

		}

		static int getColor(int a) {
			int ret = 0;
			if (1 <= a && a <= 399) {
				ret = 1;
			} else if (400 <= a && a <= 799) {
				ret = 2;
			} else if (800 <= a && a <= 1199) {
				ret = 3;
			} else if (1200 <= a && a <= 1599) {
				ret = 4;
			} else if (1600 <= a && a <= 1999) {
				ret = 5;
			} else if (2000 <= a && a <= 2399) {
				ret = 6;
			} else if (2400 <= a && a <= 2799) {
				ret = 7;
			} else if (2800 <= a && a <= 3199) {
				ret = 8;
			} else if (3200 <= a) {
				overRedCount++;
			}
			return ret;
		}
	}

	static class InputReader {
		BufferedReader in;
		StringTokenizer tok;

		public String nextString() {
			while (!tok.hasMoreTokens()) {
				try {
					tok = new StringTokenizer(in.readLine(), " ");
				} catch (IOException e) {
					throw new InputMismatchException();
				}
			}
			return tok.nextToken();
		}

		public int nextInt() {
			return Integer.parseInt(nextString());
		}

		public long nextLong() {
			return Long.parseLong(nextString());
		}

		public double nextDouble() {
			return Double.parseDouble(nextString());
		}

		public int[] nextIntArray(int n) {
			int[] res = new int[n];
			for (int i = 0; i < n; i++) {
				res[i] = nextInt();
			}
			return res;
		}

		public long[] nextLongArray(int n) {
			long[] res = new long[n];
			for (int i = 0; i < n; i++) {
				res[i] = nextLong();
			}
			return res;
		}

		public InputReader(InputStream inputStream) {
			in = new BufferedReader(new InputStreamReader(inputStream));
			tok = new StringTokenizer("");
		}

	}

}
