import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ
		Scanner scan = new Scanner(System.in);

		final int TH = 400;
		int n = scan.nextInt();
		int[] a = new int[n];
		for(int i = 0 ; i < n ; i++ ){
			a[i] = scan.nextInt();
		}
		int gray =0;
		int braun=0;
		int green=0;
		int cyan=0;
		int blue=0;
		int orange=0;
		int bulaun=0;
		int red=0;
		int over =0;

		for( int hoge : a){
			if(hoge < TH){
				gray++;
			}else if(hoge < 2*TH){
				braun++;
			}else if(hoge < 3*TH){
				green++;
			}else if(hoge < 4*TH){
				cyan++;
			}else if(hoge < 5*TH){
				blue++;
			}else if(hoge < 6*TH){
				orange++;
			}else if(hoge < 7*TH){
				bulaun++;
			}else if(hoge < 8*TH){
				red++;
			}else{
				over++;
			}
		}
		
		int maxColor=0;
		int minColor=0;
		
		if (gray>0){
			maxColor++;
			minColor++;
		}
		if (braun>0){
			maxColor++;
			minColor++;
		}
		if (green>0){
			maxColor++;
			minColor++;
		}
		if (cyan>0){
			maxColor++;
			minColor++;
		}
		if (blue>0){
			maxColor++;
			minColor++;
		}
		if (orange>0){
			maxColor++;
			minColor++;
		}
		if (bulaun>0){
			maxColor++;
			minColor++;
		}
		if (red>0){
			maxColor++;
			minColor++;
		}
		if (over>0){
			maxColor += over;
			if(minColor==0){
				minColor=1;
			}
		}
		
		System.out.println("" + minColor + " "+ maxColor);
		
	}
} import java.util.Scanner; Scanner java.util public class Main {

	public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ
		Scanner scan = new Scanner(System.in);

		final int TH = 400;
		int n = scan.nextInt();
		int[] a = new int[n];
		for(int i = 0 ; i < n ; i++ ){
			a[i] = scan.nextInt();
		}
		int gray =0;
		int braun=0;
		int green=0;
		int cyan=0;
		int blue=0;
		int orange=0;
		int bulaun=0;
		int red=0;
		int over =0;

		for( int hoge : a){
			if(hoge < TH){
				gray++;
			}else if(hoge < 2*TH){
				braun++;
			}else if(hoge < 3*TH){
				green++;
			}else if(hoge < 4*TH){
				cyan++;
			}else if(hoge < 5*TH){
				blue++;
			}else if(hoge < 6*TH){
				orange++;
			}else if(hoge < 7*TH){
				bulaun++;
			}else if(hoge < 8*TH){
				red++;
			}else{
				over++;
			}
		}
		
		int maxColor=0;
		int minColor=0;
		
		if (gray>0){
			maxColor++;
			minColor++;
		}
		if (braun>0){
			maxColor++;
			minColor++;
		}
		if (green>0){
			maxColor++;
			minColor++;
		}
		if (cyan>0){
			maxColor++;
			minColor++;
		}
		if (blue>0){
			maxColor++;
			minColor++;
		}
		if (orange>0){
			maxColor++;
			minColor++;
		}
		if (bulaun>0){
			maxColor++;
			minColor++;
		}
		if (red>0){
			maxColor++;
			minColor++;
		}
		if (over>0){
			maxColor += over;
			if(minColor==0){
				minColor=1;
			}
		}
		
		System.out.println("" + minColor + " "+ maxColor);
		
	}
} Main public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ
		Scanner scan = new Scanner(System.in);

		final int TH = 400;
		int n = scan.nextInt();
		int[] a = new int[n];
		for(int i = 0 ; i < n ; i++ ){
			a[i] = scan.nextInt();
		}
		int gray =0;
		int braun=0;
		int green=0;
		int cyan=0;
		int blue=0;
		int orange=0;
		int bulaun=0;
		int red=0;
		int over =0;

		for( int hoge : a){
			if(hoge < TH){
				gray++;
			}else if(hoge < 2*TH){
				braun++;
			}else if(hoge < 3*TH){
				green++;
			}else if(hoge < 4*TH){
				cyan++;
			}else if(hoge < 5*TH){
				blue++;
			}else if(hoge < 6*TH){
				orange++;
			}else if(hoge < 7*TH){
				bulaun++;
			}else if(hoge < 8*TH){
				red++;
			}else{
				over++;
			}
		}
		
		int maxColor=0;
		int minColor=0;
		
		if (gray>0){
			maxColor++;
			minColor++;
		}
		if (braun>0){
			maxColor++;
			minColor++;
		}
		if (green>0){
			maxColor++;
			minColor++;
		}
		if (cyan>0){
			maxColor++;
			minColor++;
		}
		if (blue>0){
			maxColor++;
			minColor++;
		}
		if (orange>0){
			maxColor++;
			minColor++;
		}
		if (bulaun>0){
			maxColor++;
			minColor++;
		}
		if (red>0){
			maxColor++;
			minColor++;
		}
		if (over>0){
			maxColor += over;
			if(minColor==0){
				minColor=1;
			}
		}
		
		System.out.println("" + minColor + " "+ maxColor);
		
	} main {
		// TODO 自動生成されたメソッド・スタブ
		Scanner scan = new Scanner(System.in);

		final int TH = 400;
		int n = scan.nextInt();
		int[] a = new int[n];
		for(int i = 0 ; i < n ; i++ ){
			a[i] = scan.nextInt();
		}
		int gray =0;
		int braun=0;
		int green=0;
		int cyan=0;
		int blue=0;
		int orange=0;
		int bulaun=0;
		int red=0;
		int over =0;

		for( int hoge : a){
			if(hoge < TH){
				gray++;
			}else if(hoge < 2*TH){
				braun++;
			}else if(hoge < 3*TH){
				green++;
			}else if(hoge < 4*TH){
				cyan++;
			}else if(hoge < 5*TH){
				blue++;
			}else if(hoge < 6*TH){
				orange++;
			}else if(hoge < 7*TH){
				bulaun++;
			}else if(hoge < 8*TH){
				red++;
			}else{
				over++;
			}
		}
		
		int maxColor=0;
		int minColor=0;
		
		if (gray>0){
			maxColor++;
			minColor++;
		}
		if (braun>0){
			maxColor++;
			minColor++;
		}
		if (green>0){
			maxColor++;
			minColor++;
		}
		if (cyan>0){
			maxColor++;
			minColor++;
		}
		if (blue>0){
			maxColor++;
			minColor++;
		}
		if (orange>0){
			maxColor++;
			minColor++;
		}
		if (bulaun>0){
			maxColor++;
			minColor++;
		}
		if (red>0){
			maxColor++;
			minColor++;
		}
		if (over>0){
			maxColor += over;
			if(minColor==0){
				minColor=1;
			}
		}
		
		System.out.println("" + minColor + " "+ maxColor);
		
	} Scanner scan = new Scanner(System.in); scan new Scanner(System.in) final int TH = 400; TH 400 int n = scan.nextInt(); n scan.nextInt() scan.nextInt scan int[] a = new int[n]; a new int[n] n for(int i = 0 ; i < n ; i++ ){
			a[i] = scan.nextInt();
		} int i = 0 ; int i = 0 ; i 0 i < n i n i++ i++ i {
			a[i] = scan.nextInt();
		} {
			a[i] = scan.nextInt();
		} a[i] = scan.nextInt() a[i] a i scan.nextInt() scan.nextInt scan int gray =0; gray 0 int braun=0; braun 0 int green=0; green 0 int cyan=0; cyan 0 int blue=0; blue 0 int orange=0; orange 0 int bulaun=0; bulaun 0 int red=0; red 0 int over =0; over 0 for( int hoge : a){
			if(hoge < TH){
				gray++;
			}else if(hoge < 2*TH){
				braun++;
			}else if(hoge < 3*TH){
				green++;
			}else if(hoge < 4*TH){
				cyan++;
			}else if(hoge < 5*TH){
				blue++;
			}else if(hoge < 6*TH){
				orange++;
			}else if(hoge < 7*TH){
				bulaun++;
			}else if(hoge < 8*TH){
				red++;
			}else{
				over++;
			}
		} int hoge a {
			if(hoge < TH){
				gray++;
			}else if(hoge < 2*TH){
				braun++;
			}else if(hoge < 3*TH){
				green++;
			}else if(hoge < 4*TH){
				cyan++;
			}else if(hoge < 5*TH){
				blue++;
			}else if(hoge < 6*TH){
				orange++;
			}else if(hoge < 7*TH){
				bulaun++;
			}else if(hoge < 8*TH){
				red++;
			}else{
				over++;
			}
		} {
			if(hoge < TH){
				gray++;
			}else if(hoge < 2*TH){
				braun++;
			}else if(hoge < 3*TH){
				green++;
			}else if(hoge < 4*TH){
				cyan++;
			}else if(hoge < 5*TH){
				blue++;
			}else if(hoge < 6*TH){
				orange++;
			}else if(hoge < 7*TH){
				bulaun++;
			}else if(hoge < 8*TH){
				red++;
			}else{
				over++;
			}
		} if(hoge < TH){
				gray++;
			}else if(hoge < 2*TH){
				braun++;
			}else if(hoge < 3*TH){
				green++;
			}else if(hoge < 4*TH){
				cyan++;
			}else if(hoge < 5*TH){
				blue++;
			}else if(hoge < 6*TH){
				orange++;
			}else if(hoge < 7*TH){
				bulaun++;
			}else if(hoge < 8*TH){
				red++;
			}else{
				over++;
			} hoge < TH hoge TH {
				gray++;
			} gray++ gray if(hoge < 2*TH){
				braun++;
			}else if(hoge < 3*TH){
				green++;
			}else if(hoge < 4*TH){
				cyan++;
			}else if(hoge < 5*TH){
				blue++;
			}else if(hoge < 6*TH){
				orange++;
			}else if(hoge < 7*TH){
				bulaun++;
			}else if(hoge < 8*TH){
				red++;
			}else{
				over++;
			} hoge < 2*TH hoge 2*TH 2 TH {
				braun++;
			} braun++ braun if(hoge < 3*TH){
				green++;
			}else if(hoge < 4*TH){
				cyan++;
			}else if(hoge < 5*TH){
				blue++;
			}else if(hoge < 6*TH){
				orange++;
			}else if(hoge < 7*TH){
				bulaun++;
			}else if(hoge < 8*TH){
				red++;
			}else{
				over++;
			} hoge < 3*TH hoge 3*TH 3 TH {
				green++;
			} green++ green if(hoge < 4*TH){
				cyan++;
			}else if(hoge < 5*TH){
				blue++;
			}else if(hoge < 6*TH){
				orange++;
			}else if(hoge < 7*TH){
				bulaun++;
			}else if(hoge < 8*TH){
				red++;
			}else{
				over++;
			} hoge < 4*TH hoge 4*TH 4 TH {
				cyan++;
			} cyan++ cyan if(hoge < 5*TH){
				blue++;
			}else if(hoge < 6*TH){
				orange++;
			}else if(hoge < 7*TH){
				bulaun++;
			}else if(hoge < 8*TH){
				red++;
			}else{
				over++;
			} hoge < 5*TH hoge 5*TH 5 TH {
				blue++;
			} blue++ blue if(hoge < 6*TH){
				orange++;
			}else if(hoge < 7*TH){
				bulaun++;
			}else if(hoge < 8*TH){
				red++;
			}else{
				over++;
			} hoge < 6*TH hoge 6*TH 6 TH {
				orange++;
			} orange++ orange if(hoge < 7*TH){
				bulaun++;
			}else if(hoge < 8*TH){
				red++;
			}else{
				over++;
			} hoge < 7*TH hoge 7*TH 7 TH {
				bulaun++;
			} bulaun++ bulaun if(hoge < 8*TH){
				red++;
			}else{
				over++;
			} hoge < 8*TH hoge 8*TH 8 TH {
				red++;
			} red++ red {
				over++;
			} over++ over int maxColor=0; maxColor 0 int minColor=0; minColor 0 if (gray>0){
			maxColor++;
			minColor++;
		} gray>0 gray 0 {
			maxColor++;
			minColor++;
		} maxColor++ maxColor minColor++ minColor if (braun>0){
			maxColor++;
			minColor++;
		} braun>0 braun 0 {
			maxColor++;
			minColor++;
		} maxColor++ maxColor minColor++ minColor if (green>0){
			maxColor++;
			minColor++;
		} green>0 green 0 {
			maxColor++;
			minColor++;
		} maxColor++ maxColor minColor++ minColor if (cyan>0){
			maxColor++;
			minColor++;
		} cyan>0 cyan 0 {
			maxColor++;
			minColor++;
		} maxColor++ maxColor minColor++ minColor if (blue>0){
			maxColor++;
			minColor++;
		} blue>0 blue 0 {
			maxColor++;
			minColor++;
		} maxColor++ maxColor minColor++ minColor if (orange>0){
			maxColor++;
			minColor++;
		} orange>0 orange 0 {
			maxColor++;
			minColor++;
		} maxColor++ maxColor minColor++ minColor if (bulaun>0){
			maxColor++;
			minColor++;
		} bulaun>0 bulaun 0 {
			maxColor++;
			minColor++;
		} maxColor++ maxColor minColor++ minColor if (red>0){
			maxColor++;
			minColor++;
		} red>0 red 0 {
			maxColor++;
			minColor++;
		} maxColor++ maxColor minColor++ minColor if (over>0){
			maxColor += over;
			if(minColor==0){
				minColor=1;
			}
		} over>0 over 0 {
			maxColor += over;
			if(minColor==0){
				minColor=1;
			}
		} maxColor += over maxColor over if(minColor==0){
				minColor=1;
			} minColor==0 minColor 0 {
				minColor=1;
			} minColor=1 minColor 1 System.out.println("" + minColor + " "+ maxColor) System.out.println System.out System System.out "" + minColor + " "+ maxColor " " "" + minColor + " "+ maxColor "" minColor " " maxColor String[] args args public class Main {

	public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ
		Scanner scan = new Scanner(System.in);

		final int TH = 400;
		int n = scan.nextInt();
		int[] a = new int[n];
		for(int i = 0 ; i < n ; i++ ){
			a[i] = scan.nextInt();
		}
		int gray =0;
		int braun=0;
		int green=0;
		int cyan=0;
		int blue=0;
		int orange=0;
		int bulaun=0;
		int red=0;
		int over =0;

		for( int hoge : a){
			if(hoge < TH){
				gray++;
			}else if(hoge < 2*TH){
				braun++;
			}else if(hoge < 3*TH){
				green++;
			}else if(hoge < 4*TH){
				cyan++;
			}else if(hoge < 5*TH){
				blue++;
			}else if(hoge < 6*TH){
				orange++;
			}else if(hoge < 7*TH){
				bulaun++;
			}else if(hoge < 8*TH){
				red++;
			}else{
				over++;
			}
		}
		
		int maxColor=0;
		int minColor=0;
		
		if (gray>0){
			maxColor++;
			minColor++;
		}
		if (braun>0){
			maxColor++;
			minColor++;
		}
		if (green>0){
			maxColor++;
			minColor++;
		}
		if (cyan>0){
			maxColor++;
			minColor++;
		}
		if (blue>0){
			maxColor++;
			minColor++;
		}
		if (orange>0){
			maxColor++;
			minColor++;
		}
		if (bulaun>0){
			maxColor++;
			minColor++;
		}
		if (red>0){
			maxColor++;
			minColor++;
		}
		if (over>0){
			maxColor += over;
			if(minColor==0){
				minColor=1;
			}
		}
		
		System.out.println("" + minColor + " "+ maxColor);
		
	}
} public class Main {

	public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ
		Scanner scan = new Scanner(System.in);

		final int TH = 400;
		int n = scan.nextInt();
		int[] a = new int[n];
		for(int i = 0 ; i < n ; i++ ){
			a[i] = scan.nextInt();
		}
		int gray =0;
		int braun=0;
		int green=0;
		int cyan=0;
		int blue=0;
		int orange=0;
		int bulaun=0;
		int red=0;
		int over =0;

		for( int hoge : a){
			if(hoge < TH){
				gray++;
			}else if(hoge < 2*TH){
				braun++;
			}else if(hoge < 3*TH){
				green++;
			}else if(hoge < 4*TH){
				cyan++;
			}else if(hoge < 5*TH){
				blue++;
			}else if(hoge < 6*TH){
				orange++;
			}else if(hoge < 7*TH){
				bulaun++;
			}else if(hoge < 8*TH){
				red++;
			}else{
				over++;
			}
		}
		
		int maxColor=0;
		int minColor=0;
		
		if (gray>0){
			maxColor++;
			minColor++;
		}
		if (braun>0){
			maxColor++;
			minColor++;
		}
		if (green>0){
			maxColor++;
			minColor++;
		}
		if (cyan>0){
			maxColor++;
			minColor++;
		}
		if (blue>0){
			maxColor++;
			minColor++;
		}
		if (orange>0){
			maxColor++;
			minColor++;
		}
		if (bulaun>0){
			maxColor++;
			minColor++;
		}
		if (red>0){
			maxColor++;
			minColor++;
		}
		if (over>0){
			maxColor += over;
			if(minColor==0){
				minColor=1;
			}
		}
		
		System.out.println("" + minColor + " "+ maxColor);
		
	}
} Main
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ
		Scanner scan = new Scanner(System.in);

		final int TH = 400;
		int n = scan.nextInt();
		int[] a = new int[n];
		for(int i = 0 ; i < n ; i++ ){
			a[i] = scan.nextInt();
		}
		int gray =0;
		int braun=0;
		int green=0;
		int cyan=0;
		int blue=0;
		int orange=0;
		int bulaun=0;
		int red=0;
		int over =0;

		for( int hoge : a){
			if(hoge < TH){
				gray++;
			}else if(hoge < 2*TH){
				braun++;
			}else if(hoge < 3*TH){
				green++;
			}else if(hoge < 4*TH){
				cyan++;
			}else if(hoge < 5*TH){
				blue++;
			}else if(hoge < 6*TH){
				orange++;
			}else if(hoge < 7*TH){
				bulaun++;
			}else if(hoge < 8*TH){
				red++;
			}else{
				over++;
			}
		}
		
		int maxColor=0;
		int minColor=0;
		
		if (gray>0){
			maxColor++;
			minColor++;
		}
		if (braun>0){
			maxColor++;
			minColor++;
		}
		if (green>0){
			maxColor++;
			minColor++;
		}
		if (cyan>0){
			maxColor++;
			minColor++;
		}
		if (blue>0){
			maxColor++;
			minColor++;
		}
		if (orange>0){
			maxColor++;
			minColor++;
		}
		if (bulaun>0){
			maxColor++;
			minColor++;
		}
		if (red>0){
			maxColor++;
			minColor++;
		}
		if (over>0){
			maxColor += over;
			if(minColor==0){
				minColor=1;
			}
		}
		
		System.out.println("" + minColor + " "+ maxColor);
		
	}
}