import java.io.BufferedInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.util.Arrays;

public class Main {

	public static void main(String[] args) throws Exception {
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		int[] a = new int[N];
		sc.fill(a);

		boolean[] flag = new boolean[8];
		int max = 0;
		int min = 0;
		for (int i = 0; i < a.length; i++) {
			if (a[i] >= 3200) {
				max++;
			} else {
				int index = a[i] / 400;
				if (!flag[index]) {
					max++;
					min++;
					flag[index] = true;
				}
			}
		}

		if (min == 0) {
			min = 1;
		}

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

	private static boolean isDebug = System.getProperty("sun.desktop") != null;

	private static void debug(Object... o) {
		if (isDebug) {
			System.err.println(Arrays.deepToString(o));
		}
	}

	public static class Scanner {
		private BufferedInputStream inputStream;

		public Scanner(InputStream in) {
			inputStream = new BufferedInputStream(in);
		}

		public int nextInt() throws IOException {
			int num = 0;

			int read = skip();
			do {
				num = num * 10 + (read - 0x30);
			} while ((read = inputStream.read()) > 0x20);

			return num;
		}

		public void fill(int[] a) throws IOException {
			for (int i = 0; i < a.length; i++) {
				a[i] = nextInt();
			}
		}

		public void fill(int[] a, int[] b) throws IOException {
			if (a.length != b.length) {
				throw new IllegalArgumentException();
			}

			for (int i = 0; i < a.length; i++) {
				a[i] = nextInt();
				b[i] = nextInt();
			}
		}

		public long nextLong() throws IOException {
			long num = 0;

			int read = skip();
			do {
				num = num * 10 + (read - 0x30);
			} while ((read = inputStream.read()) > 0x20);

			return num;
		}

		public void fill(long[] a) throws IOException {
			for (int i = 0; i < a.length; i++) {
				a[i] = nextLong();
			}
		}

		public void fill(long[] a, long[] b) throws IOException {
			if (a.length != b.length) {
				throw new IllegalArgumentException();
			}

			for (int i = 0; i < a.length; i++) {
				a[i] = nextLong();
				b[i] = nextLong();
			}
		}

		public long[] nextLong(int n) throws IOException {
			long[] array = new long[n];
			for (int i = 0; i < n; i++) {
				array[i] = nextLong();
			}

			return array;
		}

		public String next() throws IOException {
			StringBuilder builder = new StringBuilder();

			int read = skip();
			do {
				builder.append((char) read);
			} while ((read = inputStream.read()) > 0x20);

			return builder.toString();
		}

		private int skip() throws IOException {
			int read;
			while ((read = inputStream.read()) <= 0x20)
				;

			return read;
		}
	}
} import java.io.BufferedInputStream; BufferedInputStream java.io import java.io.IOException; IOException java.io import java.io.InputStream; InputStream java.io import java.util.Arrays; Arrays java.util public class Main {

	public static void main(String[] args) throws Exception {
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		int[] a = new int[N];
		sc.fill(a);

		boolean[] flag = new boolean[8];
		int max = 0;
		int min = 0;
		for (int i = 0; i < a.length; i++) {
			if (a[i] >= 3200) {
				max++;
			} else {
				int index = a[i] / 400;
				if (!flag[index]) {
					max++;
					min++;
					flag[index] = true;
				}
			}
		}

		if (min == 0) {
			min = 1;
		}

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

	private static boolean isDebug = System.getProperty("sun.desktop") != null;

	private static void debug(Object... o) {
		if (isDebug) {
			System.err.println(Arrays.deepToString(o));
		}
	}

	public static class Scanner {
		private BufferedInputStream inputStream;

		public Scanner(InputStream in) {
			inputStream = new BufferedInputStream(in);
		}

		public int nextInt() throws IOException {
			int num = 0;

			int read = skip();
			do {
				num = num * 10 + (read - 0x30);
			} while ((read = inputStream.read()) > 0x20);

			return num;
		}

		public void fill(int[] a) throws IOException {
			for (int i = 0; i < a.length; i++) {
				a[i] = nextInt();
			}
		}

		public void fill(int[] a, int[] b) throws IOException {
			if (a.length != b.length) {
				throw new IllegalArgumentException();
			}

			for (int i = 0; i < a.length; i++) {
				a[i] = nextInt();
				b[i] = nextInt();
			}
		}

		public long nextLong() throws IOException {
			long num = 0;

			int read = skip();
			do {
				num = num * 10 + (read - 0x30);
			} while ((read = inputStream.read()) > 0x20);

			return num;
		}

		public void fill(long[] a) throws IOException {
			for (int i = 0; i < a.length; i++) {
				a[i] = nextLong();
			}
		}

		public void fill(long[] a, long[] b) throws IOException {
			if (a.length != b.length) {
				throw new IllegalArgumentException();
			}

			for (int i = 0; i < a.length; i++) {
				a[i] = nextLong();
				b[i] = nextLong();
			}
		}

		public long[] nextLong(int n) throws IOException {
			long[] array = new long[n];
			for (int i = 0; i < n; i++) {
				array[i] = nextLong();
			}

			return array;
		}

		public String next() throws IOException {
			StringBuilder builder = new StringBuilder();

			int read = skip();
			do {
				builder.append((char) read);
			} while ((read = inputStream.read()) > 0x20);

			return builder.toString();
		}

		private int skip() throws IOException {
			int read;
			while ((read = inputStream.read()) <= 0x20)
				;

			return read;
		}
	}
} Main private static boolean isDebug = System.getProperty("sun.desktop") != null; isDebug System.getProperty("sun.desktop") != null System.getProperty("sun.desktop") System.getProperty System "sun.desktop" null public static void main(String[] args) throws Exception {
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		int[] a = new int[N];
		sc.fill(a);

		boolean[] flag = new boolean[8];
		int max = 0;
		int min = 0;
		for (int i = 0; i < a.length; i++) {
			if (a[i] >= 3200) {
				max++;
			} else {
				int index = a[i] / 400;
				if (!flag[index]) {
					max++;
					min++;
					flag[index] = true;
				}
			}
		}

		if (min == 0) {
			min = 1;
		}

		System.out.println(min + " " + max);
	} main {
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		int[] a = new int[N];
		sc.fill(a);

		boolean[] flag = new boolean[8];
		int max = 0;
		int min = 0;
		for (int i = 0; i < a.length; i++) {
			if (a[i] >= 3200) {
				max++;
			} else {
				int index = a[i] / 400;
				if (!flag[index]) {
					max++;
					min++;
					flag[index] = true;
				}
			}
		}

		if (min == 0) {
			min = 1;
		}

		System.out.println(min + " " + max);
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int N = sc.nextInt(); N sc.nextInt() sc.nextInt sc int[] a = new int[N]; a new int[N] N sc.fill(a) sc.fill sc a boolean[] flag = new boolean[8]; flag new boolean[8] 8 int max = 0; max 0 int min = 0; min 0 for (int i = 0; i < a.length; i++) {
			if (a[i] >= 3200) {
				max++;
			} else {
				int index = a[i] / 400;
				if (!flag[index]) {
					max++;
					min++;
					flag[index] = true;
				}
			}
		} int i = 0; int i = 0; i 0 i < a.length i a.length a a.length i++ i++ i {
			if (a[i] >= 3200) {
				max++;
			} else {
				int index = a[i] / 400;
				if (!flag[index]) {
					max++;
					min++;
					flag[index] = true;
				}
			}
		} {
			if (a[i] >= 3200) {
				max++;
			} else {
				int index = a[i] / 400;
				if (!flag[index]) {
					max++;
					min++;
					flag[index] = true;
				}
			}
		} if (a[i] >= 3200) {
				max++;
			} else {
				int index = a[i] / 400;
				if (!flag[index]) {
					max++;
					min++;
					flag[index] = true;
				}
			} a[i] >= 3200 a[i] a i 3200 {
				max++;
			} max++ max {
				int index = a[i] / 400;
				if (!flag[index]) {
					max++;
					min++;
					flag[index] = true;
				}
			} int index = a[i] / 400; index a[i] / 400 a[i] a i 400 if (!flag[index]) {
					max++;
					min++;
					flag[index] = true;
				} !flag[index] flag[index] flag index {
					max++;
					min++;
					flag[index] = true;
				} max++ max min++ min flag[index] = true flag[index] flag index true if (min == 0) {
			min = 1;
		} min == 0 min 0 {
			min = 1;
		} min = 1 min 1 System.out.println(min + " " + max) System.out.println System.out System System.out min + " " + max min + " " + max min " " max String[] args args private static void debug(Object... o) {
		if (isDebug) {
			System.err.println(Arrays.deepToString(o));
		}
	} debug {
		if (isDebug) {
			System.err.println(Arrays.deepToString(o));
		}
	} if (isDebug) {
			System.err.println(Arrays.deepToString(o));
		} isDebug {
			System.err.println(Arrays.deepToString(o));
		} System.err.println(Arrays.deepToString(o)) System.err.println System.err System System.err Arrays.deepToString(o) Arrays.deepToString Arrays o Object... o o public static class Scanner {
		private BufferedInputStream inputStream;

		public Scanner(InputStream in) {
			inputStream = new BufferedInputStream(in);
		}

		public int nextInt() throws IOException {
			int num = 0;

			int read = skip();
			do {
				num = num * 10 + (read - 0x30);
			} while ((read = inputStream.read()) > 0x20);

			return num;
		}

		public void fill(int[] a) throws IOException {
			for (int i = 0; i < a.length; i++) {
				a[i] = nextInt();
			}
		}

		public void fill(int[] a, int[] b) throws IOException {
			if (a.length != b.length) {
				throw new IllegalArgumentException();
			}

			for (int i = 0; i < a.length; i++) {
				a[i] = nextInt();
				b[i] = nextInt();
			}
		}

		public long nextLong() throws IOException {
			long num = 0;

			int read = skip();
			do {
				num = num * 10 + (read - 0x30);
			} while ((read = inputStream.read()) > 0x20);

			return num;
		}

		public void fill(long[] a) throws IOException {
			for (int i = 0; i < a.length; i++) {
				a[i] = nextLong();
			}
		}

		public void fill(long[] a, long[] b) throws IOException {
			if (a.length != b.length) {
				throw new IllegalArgumentException();
			}

			for (int i = 0; i < a.length; i++) {
				a[i] = nextLong();
				b[i] = nextLong();
			}
		}

		public long[] nextLong(int n) throws IOException {
			long[] array = new long[n];
			for (int i = 0; i < n; i++) {
				array[i] = nextLong();
			}

			return array;
		}

		public String next() throws IOException {
			StringBuilder builder = new StringBuilder();

			int read = skip();
			do {
				builder.append((char) read);
			} while ((read = inputStream.read()) > 0x20);

			return builder.toString();
		}

		private int skip() throws IOException {
			int read;
			while ((read = inputStream.read()) <= 0x20)
				;

			return read;
		}
	} Scanner private BufferedInputStream inputStream; inputStream public Scanner(InputStream in) {
			inputStream = new BufferedInputStream(in);
		} Scanner {
			inputStream = new BufferedInputStream(in);
		} inputStream = new BufferedInputStream(in) inputStream new BufferedInputStream(in) InputStream in in public int nextInt() throws IOException {
			int num = 0;

			int read = skip();
			do {
				num = num * 10 + (read - 0x30);
			} while ((read = inputStream.read()) > 0x20);

			return num;
		} nextInt {
			int num = 0;

			int read = skip();
			do {
				num = num * 10 + (read - 0x30);
			} while ((read = inputStream.read()) > 0x20);

			return num;
		} int num = 0; num 0 int read = skip(); read skip() skip do {
				num = num * 10 + (read - 0x30);
			} while ((read = inputStream.read()) > 0x20); (read = inputStream.read()) > 0x20 (read = inputStream.read()) read inputStream.read() inputStream.read inputStream 0x20 {
				num = num * 10 + (read - 0x30);
			} num = num * 10 + (read - 0x30) num num * 10 + (read - 0x30) num * 10 num 10 (read - 0x30) read 0x30 return num; num public void fill(int[] a) throws IOException {
			for (int i = 0; i < a.length; i++) {
				a[i] = nextInt();
			}
		} fill {
			for (int i = 0; i < a.length; i++) {
				a[i] = nextInt();
			}
		} for (int i = 0; i < a.length; i++) {
				a[i] = nextInt();
			} int i = 0; int i = 0; i 0 i < a.length i a.length a a.length i++ i++ i {
				a[i] = nextInt();
			} {
				a[i] = nextInt();
			} a[i] = nextInt() a[i] a i nextInt() nextInt int[] a a public void fill(int[] a, int[] b) throws IOException {
			if (a.length != b.length) {
				throw new IllegalArgumentException();
			}

			for (int i = 0; i < a.length; i++) {
				a[i] = nextInt();
				b[i] = nextInt();
			}
		} fill {
			if (a.length != b.length) {
				throw new IllegalArgumentException();
			}

			for (int i = 0; i < a.length; i++) {
				a[i] = nextInt();
				b[i] = nextInt();
			}
		} if (a.length != b.length) {
				throw new IllegalArgumentException();
			} a.length != b.length a.length a a.length b.length b b.length {
				throw new IllegalArgumentException();
			} throw new IllegalArgumentException(); new IllegalArgumentException() for (int i = 0; i < a.length; i++) {
				a[i] = nextInt();
				b[i] = nextInt();
			} int i = 0; int i = 0; i 0 i < a.length i a.length a a.length i++ i++ i {
				a[i] = nextInt();
				b[i] = nextInt();
			} {
				a[i] = nextInt();
				b[i] = nextInt();
			} a[i] = nextInt() a[i] a i nextInt() nextInt b[i] = nextInt() b[i] b i nextInt() nextInt int[] a a int[] b b public long nextLong() throws IOException {
			long num = 0;

			int read = skip();
			do {
				num = num * 10 + (read - 0x30);
			} while ((read = inputStream.read()) > 0x20);

			return num;
		} nextLong {
			long num = 0;

			int read = skip();
			do {
				num = num * 10 + (read - 0x30);
			} while ((read = inputStream.read()) > 0x20);

			return num;
		} long num = 0; num 0 int read = skip(); read skip() skip do {
				num = num * 10 + (read - 0x30);
			} while ((read = inputStream.read()) > 0x20); (read = inputStream.read()) > 0x20 (read = inputStream.read()) read inputStream.read() inputStream.read inputStream 0x20 {
				num = num * 10 + (read - 0x30);
			} num = num * 10 + (read - 0x30) num num * 10 + (read - 0x30) num * 10 num 10 (read - 0x30) read 0x30 return num; num public void fill(long[] a) throws IOException {
			for (int i = 0; i < a.length; i++) {
				a[i] = nextLong();
			}
		} fill {
			for (int i = 0; i < a.length; i++) {
				a[i] = nextLong();
			}
		} for (int i = 0; i < a.length; i++) {
				a[i] = nextLong();
			} int i = 0; int i = 0; i 0 i < a.length i a.length a a.length i++ i++ i {
				a[i] = nextLong();
			} {
				a[i] = nextLong();
			} a[i] = nextLong() a[i] a i nextLong() nextLong long[] a a public void fill(long[] a, long[] b) throws IOException {
			if (a.length != b.length) {
				throw new IllegalArgumentException();
			}

			for (int i = 0; i < a.length; i++) {
				a[i] = nextLong();
				b[i] = nextLong();
			}
		} fill {
			if (a.length != b.length) {
				throw new IllegalArgumentException();
			}

			for (int i = 0; i < a.length; i++) {
				a[i] = nextLong();
				b[i] = nextLong();
			}
		} if (a.length != b.length) {
				throw new IllegalArgumentException();
			} a.length != b.length a.length a a.length b.length b b.length {
				throw new IllegalArgumentException();
			} throw new IllegalArgumentException(); new IllegalArgumentException() for (int i = 0; i < a.length; i++) {
				a[i] = nextLong();
				b[i] = nextLong();
			} int i = 0; int i = 0; i 0 i < a.length i a.length a a.length i++ i++ i {
				a[i] = nextLong();
				b[i] = nextLong();
			} {
				a[i] = nextLong();
				b[i] = nextLong();
			} a[i] = nextLong() a[i] a i nextLong() nextLong b[i] = nextLong() b[i] b i nextLong() nextLong long[] a a long[] b b public long[] nextLong(int n) throws IOException {
			long[] array = new long[n];
			for (int i = 0; i < n; i++) {
				array[i] = nextLong();
			}

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

			return array;
		} long[] array = new long[n]; array new long[n] n for (int i = 0; i < n; i++) {
				array[i] = nextLong();
			} int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
				array[i] = nextLong();
			} {
				array[i] = nextLong();
			} array[i] = nextLong() array[i] array i nextLong() nextLong return array; array int n n public String next() throws IOException {
			StringBuilder builder = new StringBuilder();

			int read = skip();
			do {
				builder.append((char) read);
			} while ((read = inputStream.read()) > 0x20);

			return builder.toString();
		} next {
			StringBuilder builder = new StringBuilder();

			int read = skip();
			do {
				builder.append((char) read);
			} while ((read = inputStream.read()) > 0x20);

			return builder.toString();
		} StringBuilder builder = new StringBuilder(); builder new StringBuilder() int read = skip(); read skip() skip do {
				builder.append((char) read);
			} while ((read = inputStream.read()) > 0x20); (read = inputStream.read()) > 0x20 (read = inputStream.read()) read inputStream.read() inputStream.read inputStream 0x20 {
				builder.append((char) read);
			} builder.append((char) read) builder.append builder (char) read return builder.toString(); builder.toString() builder.toString builder private int skip() throws IOException {
			int read;
			while ((read = inputStream.read()) <= 0x20)
				;

			return read;
		} skip {
			int read;
			while ((read = inputStream.read()) <= 0x20)
				;

			return read;
		} int read; read while ((read = inputStream.read()) <= 0x20)
				; (read = inputStream.read()) <= 0x20 (read = inputStream.read()) read inputStream.read() inputStream.read inputStream 0x20 return read; read public class Main {

	public static void main(String[] args) throws Exception {
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		int[] a = new int[N];
		sc.fill(a);

		boolean[] flag = new boolean[8];
		int max = 0;
		int min = 0;
		for (int i = 0; i < a.length; i++) {
			if (a[i] >= 3200) {
				max++;
			} else {
				int index = a[i] / 400;
				if (!flag[index]) {
					max++;
					min++;
					flag[index] = true;
				}
			}
		}

		if (min == 0) {
			min = 1;
		}

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

	private static boolean isDebug = System.getProperty("sun.desktop") != null;

	private static void debug(Object... o) {
		if (isDebug) {
			System.err.println(Arrays.deepToString(o));
		}
	}

	public static class Scanner {
		private BufferedInputStream inputStream;

		public Scanner(InputStream in) {
			inputStream = new BufferedInputStream(in);
		}

		public int nextInt() throws IOException {
			int num = 0;

			int read = skip();
			do {
				num = num * 10 + (read - 0x30);
			} while ((read = inputStream.read()) > 0x20);

			return num;
		}

		public void fill(int[] a) throws IOException {
			for (int i = 0; i < a.length; i++) {
				a[i] = nextInt();
			}
		}

		public void fill(int[] a, int[] b) throws IOException {
			if (a.length != b.length) {
				throw new IllegalArgumentException();
			}

			for (int i = 0; i < a.length; i++) {
				a[i] = nextInt();
				b[i] = nextInt();
			}
		}

		public long nextLong() throws IOException {
			long num = 0;

			int read = skip();
			do {
				num = num * 10 + (read - 0x30);
			} while ((read = inputStream.read()) > 0x20);

			return num;
		}

		public void fill(long[] a) throws IOException {
			for (int i = 0; i < a.length; i++) {
				a[i] = nextLong();
			}
		}

		public void fill(long[] a, long[] b) throws IOException {
			if (a.length != b.length) {
				throw new IllegalArgumentException();
			}

			for (int i = 0; i < a.length; i++) {
				a[i] = nextLong();
				b[i] = nextLong();
			}
		}

		public long[] nextLong(int n) throws IOException {
			long[] array = new long[n];
			for (int i = 0; i < n; i++) {
				array[i] = nextLong();
			}

			return array;
		}

		public String next() throws IOException {
			StringBuilder builder = new StringBuilder();

			int read = skip();
			do {
				builder.append((char) read);
			} while ((read = inputStream.read()) > 0x20);

			return builder.toString();
		}

		private int skip() throws IOException {
			int read;
			while ((read = inputStream.read()) <= 0x20)
				;

			return read;
		}
	}
} public class Main {

	public static void main(String[] args) throws Exception {
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		int[] a = new int[N];
		sc.fill(a);

		boolean[] flag = new boolean[8];
		int max = 0;
		int min = 0;
		for (int i = 0; i < a.length; i++) {
			if (a[i] >= 3200) {
				max++;
			} else {
				int index = a[i] / 400;
				if (!flag[index]) {
					max++;
					min++;
					flag[index] = true;
				}
			}
		}

		if (min == 0) {
			min = 1;
		}

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

	private static boolean isDebug = System.getProperty("sun.desktop") != null;

	private static void debug(Object... o) {
		if (isDebug) {
			System.err.println(Arrays.deepToString(o));
		}
	}

	public static class Scanner {
		private BufferedInputStream inputStream;

		public Scanner(InputStream in) {
			inputStream = new BufferedInputStream(in);
		}

		public int nextInt() throws IOException {
			int num = 0;

			int read = skip();
			do {
				num = num * 10 + (read - 0x30);
			} while ((read = inputStream.read()) > 0x20);

			return num;
		}

		public void fill(int[] a) throws IOException {
			for (int i = 0; i < a.length; i++) {
				a[i] = nextInt();
			}
		}

		public void fill(int[] a, int[] b) throws IOException {
			if (a.length != b.length) {
				throw new IllegalArgumentException();
			}

			for (int i = 0; i < a.length; i++) {
				a[i] = nextInt();
				b[i] = nextInt();
			}
		}

		public long nextLong() throws IOException {
			long num = 0;

			int read = skip();
			do {
				num = num * 10 + (read - 0x30);
			} while ((read = inputStream.read()) > 0x20);

			return num;
		}

		public void fill(long[] a) throws IOException {
			for (int i = 0; i < a.length; i++) {
				a[i] = nextLong();
			}
		}

		public void fill(long[] a, long[] b) throws IOException {
			if (a.length != b.length) {
				throw new IllegalArgumentException();
			}

			for (int i = 0; i < a.length; i++) {
				a[i] = nextLong();
				b[i] = nextLong();
			}
		}

		public long[] nextLong(int n) throws IOException {
			long[] array = new long[n];
			for (int i = 0; i < n; i++) {
				array[i] = nextLong();
			}

			return array;
		}

		public String next() throws IOException {
			StringBuilder builder = new StringBuilder();

			int read = skip();
			do {
				builder.append((char) read);
			} while ((read = inputStream.read()) > 0x20);

			return builder.toString();
		}

		private int skip() throws IOException {
			int read;
			while ((read = inputStream.read()) <= 0x20)
				;

			return read;
		}
	}
} Main
import java.io.BufferedInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.util.Arrays;

public class Main {

	public static void main(String[] args) throws Exception {
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		int[] a = new int[N];
		sc.fill(a);

		boolean[] flag = new boolean[8];
		int max = 0;
		int min = 0;
		for (int i = 0; i < a.length; i++) {
			if (a[i] >= 3200) {
				max++;
			} else {
				int index = a[i] / 400;
				if (!flag[index]) {
					max++;
					min++;
					flag[index] = true;
				}
			}
		}

		if (min == 0) {
			min = 1;
		}

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

	private static boolean isDebug = System.getProperty("sun.desktop") != null;

	private static void debug(Object... o) {
		if (isDebug) {
			System.err.println(Arrays.deepToString(o));
		}
	}

	public static class Scanner {
		private BufferedInputStream inputStream;

		public Scanner(InputStream in) {
			inputStream = new BufferedInputStream(in);
		}

		public int nextInt() throws IOException {
			int num = 0;

			int read = skip();
			do {
				num = num * 10 + (read - 0x30);
			} while ((read = inputStream.read()) > 0x20);

			return num;
		}

		public void fill(int[] a) throws IOException {
			for (int i = 0; i < a.length; i++) {
				a[i] = nextInt();
			}
		}

		public void fill(int[] a, int[] b) throws IOException {
			if (a.length != b.length) {
				throw new IllegalArgumentException();
			}

			for (int i = 0; i < a.length; i++) {
				a[i] = nextInt();
				b[i] = nextInt();
			}
		}

		public long nextLong() throws IOException {
			long num = 0;

			int read = skip();
			do {
				num = num * 10 + (read - 0x30);
			} while ((read = inputStream.read()) > 0x20);

			return num;
		}

		public void fill(long[] a) throws IOException {
			for (int i = 0; i < a.length; i++) {
				a[i] = nextLong();
			}
		}

		public void fill(long[] a, long[] b) throws IOException {
			if (a.length != b.length) {
				throw new IllegalArgumentException();
			}

			for (int i = 0; i < a.length; i++) {
				a[i] = nextLong();
				b[i] = nextLong();
			}
		}

		public long[] nextLong(int n) throws IOException {
			long[] array = new long[n];
			for (int i = 0; i < n; i++) {
				array[i] = nextLong();
			}

			return array;
		}

		public String next() throws IOException {
			StringBuilder builder = new StringBuilder();

			int read = skip();
			do {
				builder.append((char) read);
			} while ((read = inputStream.read()) > 0x20);

			return builder.toString();
		}

		private int skip() throws IOException {
			int read;
			while ((read = inputStream.read()) <= 0x20)
				;

			return read;
		}
	}
}