import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;

public class Main {
	public static void main(String args[]) {

	Scanner std = new Scanner(System.in);
	List<Integer> list = new ArrayList<>();
	int N = std.nextInt();

	int gray = 0;
	int tea = 0;
	int green = 0;
	int lightblue = 0;
	int blue = 0;
	int yellow = 0;
	int orange = 0;
	int red = 0;
	int rainbow1 = 0;
    int rainbow2 = 0;

    int min = 0;
    int max = 0;

	for(int i = 0; i < N; i++) {
	   int a = std.nextInt();
	   list.add(a);
	}
	for(int i = 0; i < N; i++) {
	int x = list.get(i);

	if(1 <= x && x <= 399) {
		gray = 1; }

	if(400 <= x && x <= 799) {
	    tea = 1;}

	if(800 <= x && x <= 1199) {
		green = 1;
	}

	if(1200 <= x && x <= 1599) {
		lightblue = 1;
	}

	if(1600 <= x && x <= 1999) {
		blue = 1;
	}

	if(2000 <= x && x <= 2399) {
		yellow = 1;
	}

	if(2400 <= x && x <= 2799) {
		orange = 1;
	}

	if(2800 <= x && x <= 3199) {
		red = 1;
	}

	if(3200 <= x && x <= 4800 ) {
		rainbow1 = 1;
		rainbow2++;
	}


	}

	if(gray + tea + green + lightblue + blue + yellow + orange + red  == 0) {
	min = 1;
	}

	else {
		min = gray + tea + green + lightblue + blue + yellow + orange + red;
	}

	max = gray + tea + green + lightblue + blue + yellow + orange + red + rainbow2;

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


	}
} import java.util.ArrayList; ArrayList java.util import java.util.List; List java.util import java.util.Scanner; Scanner java.util public class Main {
	public static void main(String args[]) {

	Scanner std = new Scanner(System.in);
	List<Integer> list = new ArrayList<>();
	int N = std.nextInt();

	int gray = 0;
	int tea = 0;
	int green = 0;
	int lightblue = 0;
	int blue = 0;
	int yellow = 0;
	int orange = 0;
	int red = 0;
	int rainbow1 = 0;
    int rainbow2 = 0;

    int min = 0;
    int max = 0;

	for(int i = 0; i < N; i++) {
	   int a = std.nextInt();
	   list.add(a);
	}
	for(int i = 0; i < N; i++) {
	int x = list.get(i);

	if(1 <= x && x <= 399) {
		gray = 1; }

	if(400 <= x && x <= 799) {
	    tea = 1;}

	if(800 <= x && x <= 1199) {
		green = 1;
	}

	if(1200 <= x && x <= 1599) {
		lightblue = 1;
	}

	if(1600 <= x && x <= 1999) {
		blue = 1;
	}

	if(2000 <= x && x <= 2399) {
		yellow = 1;
	}

	if(2400 <= x && x <= 2799) {
		orange = 1;
	}

	if(2800 <= x && x <= 3199) {
		red = 1;
	}

	if(3200 <= x && x <= 4800 ) {
		rainbow1 = 1;
		rainbow2++;
	}


	}

	if(gray + tea + green + lightblue + blue + yellow + orange + red  == 0) {
	min = 1;
	}

	else {
		min = gray + tea + green + lightblue + blue + yellow + orange + red;
	}

	max = gray + tea + green + lightblue + blue + yellow + orange + red + rainbow2;

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


	}
} Main public static void main(String args[]) {

	Scanner std = new Scanner(System.in);
	List<Integer> list = new ArrayList<>();
	int N = std.nextInt();

	int gray = 0;
	int tea = 0;
	int green = 0;
	int lightblue = 0;
	int blue = 0;
	int yellow = 0;
	int orange = 0;
	int red = 0;
	int rainbow1 = 0;
    int rainbow2 = 0;

    int min = 0;
    int max = 0;

	for(int i = 0; i < N; i++) {
	   int a = std.nextInt();
	   list.add(a);
	}
	for(int i = 0; i < N; i++) {
	int x = list.get(i);

	if(1 <= x && x <= 399) {
		gray = 1; }

	if(400 <= x && x <= 799) {
	    tea = 1;}

	if(800 <= x && x <= 1199) {
		green = 1;
	}

	if(1200 <= x && x <= 1599) {
		lightblue = 1;
	}

	if(1600 <= x && x <= 1999) {
		blue = 1;
	}

	if(2000 <= x && x <= 2399) {
		yellow = 1;
	}

	if(2400 <= x && x <= 2799) {
		orange = 1;
	}

	if(2800 <= x && x <= 3199) {
		red = 1;
	}

	if(3200 <= x && x <= 4800 ) {
		rainbow1 = 1;
		rainbow2++;
	}


	}

	if(gray + tea + green + lightblue + blue + yellow + orange + red  == 0) {
	min = 1;
	}

	else {
		min = gray + tea + green + lightblue + blue + yellow + orange + red;
	}

	max = gray + tea + green + lightblue + blue + yellow + orange + red + rainbow2;

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


	} main {

	Scanner std = new Scanner(System.in);
	List<Integer> list = new ArrayList<>();
	int N = std.nextInt();

	int gray = 0;
	int tea = 0;
	int green = 0;
	int lightblue = 0;
	int blue = 0;
	int yellow = 0;
	int orange = 0;
	int red = 0;
	int rainbow1 = 0;
    int rainbow2 = 0;

    int min = 0;
    int max = 0;

	for(int i = 0; i < N; i++) {
	   int a = std.nextInt();
	   list.add(a);
	}
	for(int i = 0; i < N; i++) {
	int x = list.get(i);

	if(1 <= x && x <= 399) {
		gray = 1; }

	if(400 <= x && x <= 799) {
	    tea = 1;}

	if(800 <= x && x <= 1199) {
		green = 1;
	}

	if(1200 <= x && x <= 1599) {
		lightblue = 1;
	}

	if(1600 <= x && x <= 1999) {
		blue = 1;
	}

	if(2000 <= x && x <= 2399) {
		yellow = 1;
	}

	if(2400 <= x && x <= 2799) {
		orange = 1;
	}

	if(2800 <= x && x <= 3199) {
		red = 1;
	}

	if(3200 <= x && x <= 4800 ) {
		rainbow1 = 1;
		rainbow2++;
	}


	}

	if(gray + tea + green + lightblue + blue + yellow + orange + red  == 0) {
	min = 1;
	}

	else {
		min = gray + tea + green + lightblue + blue + yellow + orange + red;
	}

	max = gray + tea + green + lightblue + blue + yellow + orange + red + rainbow2;

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


	} Scanner std = new Scanner(System.in); std new Scanner(System.in) List<Integer> list = new ArrayList<>(); list new ArrayList<>() int N = std.nextInt(); N std.nextInt() std.nextInt std int gray = 0; gray 0 int tea = 0; tea 0 int green = 0; green 0 int lightblue = 0; lightblue 0 int blue = 0; blue 0 int yellow = 0; yellow 0 int orange = 0; orange 0 int red = 0; red 0 int rainbow1 = 0; rainbow1 0 int rainbow2 = 0; rainbow2 0 int min = 0; min 0 int max = 0; max 0 for(int i = 0; i < N; i++) {
	   int a = std.nextInt();
	   list.add(a);
	} int i = 0; int i = 0; i 0 i < N i N i++ i++ i {
	   int a = std.nextInt();
	   list.add(a);
	} {
	   int a = std.nextInt();
	   list.add(a);
	} int a = std.nextInt(); a std.nextInt() std.nextInt std list.add(a) list.add list a for(int i = 0; i < N; i++) {
	int x = list.get(i);

	if(1 <= x && x <= 399) {
		gray = 1; }

	if(400 <= x && x <= 799) {
	    tea = 1;}

	if(800 <= x && x <= 1199) {
		green = 1;
	}

	if(1200 <= x && x <= 1599) {
		lightblue = 1;
	}

	if(1600 <= x && x <= 1999) {
		blue = 1;
	}

	if(2000 <= x && x <= 2399) {
		yellow = 1;
	}

	if(2400 <= x && x <= 2799) {
		orange = 1;
	}

	if(2800 <= x && x <= 3199) {
		red = 1;
	}

	if(3200 <= x && x <= 4800 ) {
		rainbow1 = 1;
		rainbow2++;
	}


	} int i = 0; int i = 0; i 0 i < N i N i++ i++ i {
	int x = list.get(i);

	if(1 <= x && x <= 399) {
		gray = 1; }

	if(400 <= x && x <= 799) {
	    tea = 1;}

	if(800 <= x && x <= 1199) {
		green = 1;
	}

	if(1200 <= x && x <= 1599) {
		lightblue = 1;
	}

	if(1600 <= x && x <= 1999) {
		blue = 1;
	}

	if(2000 <= x && x <= 2399) {
		yellow = 1;
	}

	if(2400 <= x && x <= 2799) {
		orange = 1;
	}

	if(2800 <= x && x <= 3199) {
		red = 1;
	}

	if(3200 <= x && x <= 4800 ) {
		rainbow1 = 1;
		rainbow2++;
	}


	} {
	int x = list.get(i);

	if(1 <= x && x <= 399) {
		gray = 1; }

	if(400 <= x && x <= 799) {
	    tea = 1;}

	if(800 <= x && x <= 1199) {
		green = 1;
	}

	if(1200 <= x && x <= 1599) {
		lightblue = 1;
	}

	if(1600 <= x && x <= 1999) {
		blue = 1;
	}

	if(2000 <= x && x <= 2399) {
		yellow = 1;
	}

	if(2400 <= x && x <= 2799) {
		orange = 1;
	}

	if(2800 <= x && x <= 3199) {
		red = 1;
	}

	if(3200 <= x && x <= 4800 ) {
		rainbow1 = 1;
		rainbow2++;
	}


	} int x = list.get(i); x list.get(i) list.get list i if(1 <= x && x <= 399) {
		gray = 1; } 1 <= x && x <= 399 1 <= x 1 x x <= 399 x 399 {
		gray = 1; } gray = 1 gray 1 if(400 <= x && x <= 799) {
	    tea = 1;} 400 <= x && x <= 799 400 <= x 400 x x <= 799 x 799 {
	    tea = 1;} tea = 1 tea 1 if(800 <= x && x <= 1199) {
		green = 1;
	} 800 <= x && x <= 1199 800 <= x 800 x x <= 1199 x 1199 {
		green = 1;
	} green = 1 green 1 if(1200 <= x && x <= 1599) {
		lightblue = 1;
	} 1200 <= x && x <= 1599 1200 <= x 1200 x x <= 1599 x 1599 {
		lightblue = 1;
	} lightblue = 1 lightblue 1 if(1600 <= x && x <= 1999) {
		blue = 1;
	} 1600 <= x && x <= 1999 1600 <= x 1600 x x <= 1999 x 1999 {
		blue = 1;
	} blue = 1 blue 1 if(2000 <= x && x <= 2399) {
		yellow = 1;
	} 2000 <= x && x <= 2399 2000 <= x 2000 x x <= 2399 x 2399 {
		yellow = 1;
	} yellow = 1 yellow 1 if(2400 <= x && x <= 2799) {
		orange = 1;
	} 2400 <= x && x <= 2799 2400 <= x 2400 x x <= 2799 x 2799 {
		orange = 1;
	} orange = 1 orange 1 if(2800 <= x && x <= 3199) {
		red = 1;
	} 2800 <= x && x <= 3199 2800 <= x 2800 x x <= 3199 x 3199 {
		red = 1;
	} red = 1 red 1 if(3200 <= x && x <= 4800 ) {
		rainbow1 = 1;
		rainbow2++;
	} 3200 <= x && x <= 4800 3200 <= x 3200 x x <= 4800 x 4800 {
		rainbow1 = 1;
		rainbow2++;
	} rainbow1 = 1 rainbow1 1 rainbow2++ rainbow2 if(gray + tea + green + lightblue + blue + yellow + orange + red  == 0) {
	min = 1;
	}

	else {
		min = gray + tea + green + lightblue + blue + yellow + orange + red;
	} gray + tea + green + lightblue + blue + yellow + orange + red  == 0 gray + tea + green + lightblue + blue + yellow + orange + red orange yellow blue lightblue green gray + tea + green + lightblue + blue + yellow + orange + red gray tea green lightblue blue yellow orange red 0 {
	min = 1;
	} min = 1 min 1 {
		min = gray + tea + green + lightblue + blue + yellow + orange + red;
	} min = gray + tea + green + lightblue + blue + yellow + orange + red min gray + tea + green + lightblue + blue + yellow + orange + red orange yellow blue lightblue green gray + tea + green + lightblue + blue + yellow + orange + red gray tea green lightblue blue yellow orange red max = gray + tea + green + lightblue + blue + yellow + orange + red + rainbow2 max gray + tea + green + lightblue + blue + yellow + orange + red + rainbow2 red orange yellow blue lightblue green gray + tea + green + lightblue + blue + yellow + orange + red + rainbow2 gray tea green lightblue blue yellow orange red rainbow2 System.out.println(min + " " + max) System.out.println System.out System System.out min + " " + max min + " " + max min " " max String args[] args public class Main {
	public static void main(String args[]) {

	Scanner std = new Scanner(System.in);
	List<Integer> list = new ArrayList<>();
	int N = std.nextInt();

	int gray = 0;
	int tea = 0;
	int green = 0;
	int lightblue = 0;
	int blue = 0;
	int yellow = 0;
	int orange = 0;
	int red = 0;
	int rainbow1 = 0;
    int rainbow2 = 0;

    int min = 0;
    int max = 0;

	for(int i = 0; i < N; i++) {
	   int a = std.nextInt();
	   list.add(a);
	}
	for(int i = 0; i < N; i++) {
	int x = list.get(i);

	if(1 <= x && x <= 399) {
		gray = 1; }

	if(400 <= x && x <= 799) {
	    tea = 1;}

	if(800 <= x && x <= 1199) {
		green = 1;
	}

	if(1200 <= x && x <= 1599) {
		lightblue = 1;
	}

	if(1600 <= x && x <= 1999) {
		blue = 1;
	}

	if(2000 <= x && x <= 2399) {
		yellow = 1;
	}

	if(2400 <= x && x <= 2799) {
		orange = 1;
	}

	if(2800 <= x && x <= 3199) {
		red = 1;
	}

	if(3200 <= x && x <= 4800 ) {
		rainbow1 = 1;
		rainbow2++;
	}


	}

	if(gray + tea + green + lightblue + blue + yellow + orange + red  == 0) {
	min = 1;
	}

	else {
		min = gray + tea + green + lightblue + blue + yellow + orange + red;
	}

	max = gray + tea + green + lightblue + blue + yellow + orange + red + rainbow2;

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


	}
} public class Main {
	public static void main(String args[]) {

	Scanner std = new Scanner(System.in);
	List<Integer> list = new ArrayList<>();
	int N = std.nextInt();

	int gray = 0;
	int tea = 0;
	int green = 0;
	int lightblue = 0;
	int blue = 0;
	int yellow = 0;
	int orange = 0;
	int red = 0;
	int rainbow1 = 0;
    int rainbow2 = 0;

    int min = 0;
    int max = 0;

	for(int i = 0; i < N; i++) {
	   int a = std.nextInt();
	   list.add(a);
	}
	for(int i = 0; i < N; i++) {
	int x = list.get(i);

	if(1 <= x && x <= 399) {
		gray = 1; }

	if(400 <= x && x <= 799) {
	    tea = 1;}

	if(800 <= x && x <= 1199) {
		green = 1;
	}

	if(1200 <= x && x <= 1599) {
		lightblue = 1;
	}

	if(1600 <= x && x <= 1999) {
		blue = 1;
	}

	if(2000 <= x && x <= 2399) {
		yellow = 1;
	}

	if(2400 <= x && x <= 2799) {
		orange = 1;
	}

	if(2800 <= x && x <= 3199) {
		red = 1;
	}

	if(3200 <= x && x <= 4800 ) {
		rainbow1 = 1;
		rainbow2++;
	}


	}

	if(gray + tea + green + lightblue + blue + yellow + orange + red  == 0) {
	min = 1;
	}

	else {
		min = gray + tea + green + lightblue + blue + yellow + orange + red;
	}

	max = gray + tea + green + lightblue + blue + yellow + orange + red + rainbow2;

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


	}
} Main
import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;

public class Main {
	public static void main(String args[]) {

	Scanner std = new Scanner(System.in);
	List<Integer> list = new ArrayList<>();
	int N = std.nextInt();

	int gray = 0;
	int tea = 0;
	int green = 0;
	int lightblue = 0;
	int blue = 0;
	int yellow = 0;
	int orange = 0;
	int red = 0;
	int rainbow1 = 0;
    int rainbow2 = 0;

    int min = 0;
    int max = 0;

	for(int i = 0; i < N; i++) {
	   int a = std.nextInt();
	   list.add(a);
	}
	for(int i = 0; i < N; i++) {
	int x = list.get(i);

	if(1 <= x && x <= 399) {
		gray = 1; }

	if(400 <= x && x <= 799) {
	    tea = 1;}

	if(800 <= x && x <= 1199) {
		green = 1;
	}

	if(1200 <= x && x <= 1599) {
		lightblue = 1;
	}

	if(1600 <= x && x <= 1999) {
		blue = 1;
	}

	if(2000 <= x && x <= 2399) {
		yellow = 1;
	}

	if(2400 <= x && x <= 2799) {
		orange = 1;
	}

	if(2800 <= x && x <= 3199) {
		red = 1;
	}

	if(3200 <= x && x <= 4800 ) {
		rainbow1 = 1;
		rainbow2++;
	}


	}

	if(gray + tea + green + lightblue + blue + yellow + orange + red  == 0) {
	min = 1;
	}

	else {
		min = gray + tea + green + lightblue + blue + yellow + orange + red;
	}

	max = gray + tea + green + lightblue + blue + yellow + orange + red + rainbow2;

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


	}
}
