import java.util.*;

public class Main {
    public static void main(String args[]){
        Scanner scanner = new Scanner(System.in);
        int N  = scanner.nextInt();
        int[] count = new int[8];
        int over = 0;
        for(int i=0;i<8;i++){
            count[i] = 0;
        }
        for(int i=0; i<N; i++){
            int a = scanner.nextInt();
            if(a <= 399){
                count[0] = Math.min(1, count[0] + 1); 
            }else if(a<=799){
                count[1] = Math.min(1, count[1] + 1); 
            }else if(a<=1199){
                count[2] = Math.min(1, count[2] + 1); 
            }else if(a<=1599){
                count[3] = Math.min(1, count[3] + 1);
            }else if(a<=1999){
                count[4] = Math.min(1, count[4] + 1);
            }else if(a<=2399){
                count[5] = Math.min(1, count[5] + 1);
            }else if(a<=2799){
                count[6] = Math.min(1, count[6] + 1);
            }else if(a<=3199){
                count[7] = Math.min(1, count[7] + 1);
            }else{
                over++;
            }
        }
        int min = 0;
        for(int i=0; i<8; i++){
            min += count[i];
        }
        int max = min+over;
        if(min==0 && over>=1){
            min=1;
        }
        System.out.println(String.valueOf(min) + " " + String.valueOf(max));
    }
} import java.util.*; util.* java public class Main {
    public static void main(String args[]){
        Scanner scanner = new Scanner(System.in);
        int N  = scanner.nextInt();
        int[] count = new int[8];
        int over = 0;
        for(int i=0;i<8;i++){
            count[i] = 0;
        }
        for(int i=0; i<N; i++){
            int a = scanner.nextInt();
            if(a <= 399){
                count[0] = Math.min(1, count[0] + 1); 
            }else if(a<=799){
                count[1] = Math.min(1, count[1] + 1); 
            }else if(a<=1199){
                count[2] = Math.min(1, count[2] + 1); 
            }else if(a<=1599){
                count[3] = Math.min(1, count[3] + 1);
            }else if(a<=1999){
                count[4] = Math.min(1, count[4] + 1);
            }else if(a<=2399){
                count[5] = Math.min(1, count[5] + 1);
            }else if(a<=2799){
                count[6] = Math.min(1, count[6] + 1);
            }else if(a<=3199){
                count[7] = Math.min(1, count[7] + 1);
            }else{
                over++;
            }
        }
        int min = 0;
        for(int i=0; i<8; i++){
            min += count[i];
        }
        int max = min+over;
        if(min==0 && over>=1){
            min=1;
        }
        System.out.println(String.valueOf(min) + " " + String.valueOf(max));
    }
} Main public static void main(String args[]){
        Scanner scanner = new Scanner(System.in);
        int N  = scanner.nextInt();
        int[] count = new int[8];
        int over = 0;
        for(int i=0;i<8;i++){
            count[i] = 0;
        }
        for(int i=0; i<N; i++){
            int a = scanner.nextInt();
            if(a <= 399){
                count[0] = Math.min(1, count[0] + 1); 
            }else if(a<=799){
                count[1] = Math.min(1, count[1] + 1); 
            }else if(a<=1199){
                count[2] = Math.min(1, count[2] + 1); 
            }else if(a<=1599){
                count[3] = Math.min(1, count[3] + 1);
            }else if(a<=1999){
                count[4] = Math.min(1, count[4] + 1);
            }else if(a<=2399){
                count[5] = Math.min(1, count[5] + 1);
            }else if(a<=2799){
                count[6] = Math.min(1, count[6] + 1);
            }else if(a<=3199){
                count[7] = Math.min(1, count[7] + 1);
            }else{
                over++;
            }
        }
        int min = 0;
        for(int i=0; i<8; i++){
            min += count[i];
        }
        int max = min+over;
        if(min==0 && over>=1){
            min=1;
        }
        System.out.println(String.valueOf(min) + " " + String.valueOf(max));
    } main {
        Scanner scanner = new Scanner(System.in);
        int N  = scanner.nextInt();
        int[] count = new int[8];
        int over = 0;
        for(int i=0;i<8;i++){
            count[i] = 0;
        }
        for(int i=0; i<N; i++){
            int a = scanner.nextInt();
            if(a <= 399){
                count[0] = Math.min(1, count[0] + 1); 
            }else if(a<=799){
                count[1] = Math.min(1, count[1] + 1); 
            }else if(a<=1199){
                count[2] = Math.min(1, count[2] + 1); 
            }else if(a<=1599){
                count[3] = Math.min(1, count[3] + 1);
            }else if(a<=1999){
                count[4] = Math.min(1, count[4] + 1);
            }else if(a<=2399){
                count[5] = Math.min(1, count[5] + 1);
            }else if(a<=2799){
                count[6] = Math.min(1, count[6] + 1);
            }else if(a<=3199){
                count[7] = Math.min(1, count[7] + 1);
            }else{
                over++;
            }
        }
        int min = 0;
        for(int i=0; i<8; i++){
            min += count[i];
        }
        int max = min+over;
        if(min==0 && over>=1){
            min=1;
        }
        System.out.println(String.valueOf(min) + " " + String.valueOf(max));
    } Scanner scanner = new Scanner(System.in); scanner new Scanner(System.in) int N  = scanner.nextInt(); N scanner.nextInt() scanner.nextInt scanner int[] count = new int[8]; count new int[8] 8 int over = 0; over 0 for(int i=0;i<8;i++){
            count[i] = 0;
        } int i=0; int i=0; i 0 i<8 i 8 i++ i++ i {
            count[i] = 0;
        } {
            count[i] = 0;
        } count[i] = 0 count[i] count i 0 for(int i=0; i<N; i++){
            int a = scanner.nextInt();
            if(a <= 399){
                count[0] = Math.min(1, count[0] + 1); 
            }else if(a<=799){
                count[1] = Math.min(1, count[1] + 1); 
            }else if(a<=1199){
                count[2] = Math.min(1, count[2] + 1); 
            }else if(a<=1599){
                count[3] = Math.min(1, count[3] + 1);
            }else if(a<=1999){
                count[4] = Math.min(1, count[4] + 1);
            }else if(a<=2399){
                count[5] = Math.min(1, count[5] + 1);
            }else if(a<=2799){
                count[6] = Math.min(1, count[6] + 1);
            }else if(a<=3199){
                count[7] = Math.min(1, count[7] + 1);
            }else{
                over++;
            }
        } int i=0; int i=0; i 0 i<N i N i++ i++ i {
            int a = scanner.nextInt();
            if(a <= 399){
                count[0] = Math.min(1, count[0] + 1); 
            }else if(a<=799){
                count[1] = Math.min(1, count[1] + 1); 
            }else if(a<=1199){
                count[2] = Math.min(1, count[2] + 1); 
            }else if(a<=1599){
                count[3] = Math.min(1, count[3] + 1);
            }else if(a<=1999){
                count[4] = Math.min(1, count[4] + 1);
            }else if(a<=2399){
                count[5] = Math.min(1, count[5] + 1);
            }else if(a<=2799){
                count[6] = Math.min(1, count[6] + 1);
            }else if(a<=3199){
                count[7] = Math.min(1, count[7] + 1);
            }else{
                over++;
            }
        } {
            int a = scanner.nextInt();
            if(a <= 399){
                count[0] = Math.min(1, count[0] + 1); 
            }else if(a<=799){
                count[1] = Math.min(1, count[1] + 1); 
            }else if(a<=1199){
                count[2] = Math.min(1, count[2] + 1); 
            }else if(a<=1599){
                count[3] = Math.min(1, count[3] + 1);
            }else if(a<=1999){
                count[4] = Math.min(1, count[4] + 1);
            }else if(a<=2399){
                count[5] = Math.min(1, count[5] + 1);
            }else if(a<=2799){
                count[6] = Math.min(1, count[6] + 1);
            }else if(a<=3199){
                count[7] = Math.min(1, count[7] + 1);
            }else{
                over++;
            }
        } int a = scanner.nextInt(); a scanner.nextInt() scanner.nextInt scanner if(a <= 399){
                count[0] = Math.min(1, count[0] + 1); 
            }else if(a<=799){
                count[1] = Math.min(1, count[1] + 1); 
            }else if(a<=1199){
                count[2] = Math.min(1, count[2] + 1); 
            }else if(a<=1599){
                count[3] = Math.min(1, count[3] + 1);
            }else if(a<=1999){
                count[4] = Math.min(1, count[4] + 1);
            }else if(a<=2399){
                count[5] = Math.min(1, count[5] + 1);
            }else if(a<=2799){
                count[6] = Math.min(1, count[6] + 1);
            }else if(a<=3199){
                count[7] = Math.min(1, count[7] + 1);
            }else{
                over++;
            } a <= 399 a 399 {
                count[0] = Math.min(1, count[0] + 1); 
            } count[0] = Math.min(1, count[0] + 1) count[0] count 0 Math.min(1, count[0] + 1) Math.min Math 1 count[0] + 1 count[0] count 0 1 if(a<=799){
                count[1] = Math.min(1, count[1] + 1); 
            }else if(a<=1199){
                count[2] = Math.min(1, count[2] + 1); 
            }else if(a<=1599){
                count[3] = Math.min(1, count[3] + 1);
            }else if(a<=1999){
                count[4] = Math.min(1, count[4] + 1);
            }else if(a<=2399){
                count[5] = Math.min(1, count[5] + 1);
            }else if(a<=2799){
                count[6] = Math.min(1, count[6] + 1);
            }else if(a<=3199){
                count[7] = Math.min(1, count[7] + 1);
            }else{
                over++;
            } a<=799 a 799 {
                count[1] = Math.min(1, count[1] + 1); 
            } count[1] = Math.min(1, count[1] + 1) count[1] count 1 Math.min(1, count[1] + 1) Math.min Math 1 count[1] + 1 count[1] count 1 1 if(a<=1199){
                count[2] = Math.min(1, count[2] + 1); 
            }else if(a<=1599){
                count[3] = Math.min(1, count[3] + 1);
            }else if(a<=1999){
                count[4] = Math.min(1, count[4] + 1);
            }else if(a<=2399){
                count[5] = Math.min(1, count[5] + 1);
            }else if(a<=2799){
                count[6] = Math.min(1, count[6] + 1);
            }else if(a<=3199){
                count[7] = Math.min(1, count[7] + 1);
            }else{
                over++;
            } a<=1199 a 1199 {
                count[2] = Math.min(1, count[2] + 1); 
            } count[2] = Math.min(1, count[2] + 1) count[2] count 2 Math.min(1, count[2] + 1) Math.min Math 1 count[2] + 1 count[2] count 2 1 if(a<=1599){
                count[3] = Math.min(1, count[3] + 1);
            }else if(a<=1999){
                count[4] = Math.min(1, count[4] + 1);
            }else if(a<=2399){
                count[5] = Math.min(1, count[5] + 1);
            }else if(a<=2799){
                count[6] = Math.min(1, count[6] + 1);
            }else if(a<=3199){
                count[7] = Math.min(1, count[7] + 1);
            }else{
                over++;
            } a<=1599 a 1599 {
                count[3] = Math.min(1, count[3] + 1);
            } count[3] = Math.min(1, count[3] + 1) count[3] count 3 Math.min(1, count[3] + 1) Math.min Math 1 count[3] + 1 count[3] count 3 1 if(a<=1999){
                count[4] = Math.min(1, count[4] + 1);
            }else if(a<=2399){
                count[5] = Math.min(1, count[5] + 1);
            }else if(a<=2799){
                count[6] = Math.min(1, count[6] + 1);
            }else if(a<=3199){
                count[7] = Math.min(1, count[7] + 1);
            }else{
                over++;
            } a<=1999 a 1999 {
                count[4] = Math.min(1, count[4] + 1);
            } count[4] = Math.min(1, count[4] + 1) count[4] count 4 Math.min(1, count[4] + 1) Math.min Math 1 count[4] + 1 count[4] count 4 1 if(a<=2399){
                count[5] = Math.min(1, count[5] + 1);
            }else if(a<=2799){
                count[6] = Math.min(1, count[6] + 1);
            }else if(a<=3199){
                count[7] = Math.min(1, count[7] + 1);
            }else{
                over++;
            } a<=2399 a 2399 {
                count[5] = Math.min(1, count[5] + 1);
            } count[5] = Math.min(1, count[5] + 1) count[5] count 5 Math.min(1, count[5] + 1) Math.min Math 1 count[5] + 1 count[5] count 5 1 if(a<=2799){
                count[6] = Math.min(1, count[6] + 1);
            }else if(a<=3199){
                count[7] = Math.min(1, count[7] + 1);
            }else{
                over++;
            } a<=2799 a 2799 {
                count[6] = Math.min(1, count[6] + 1);
            } count[6] = Math.min(1, count[6] + 1) count[6] count 6 Math.min(1, count[6] + 1) Math.min Math 1 count[6] + 1 count[6] count 6 1 if(a<=3199){
                count[7] = Math.min(1, count[7] + 1);
            }else{
                over++;
            } a<=3199 a 3199 {
                count[7] = Math.min(1, count[7] + 1);
            } count[7] = Math.min(1, count[7] + 1) count[7] count 7 Math.min(1, count[7] + 1) Math.min Math 1 count[7] + 1 count[7] count 7 1 {
                over++;
            } over++ over int min = 0; min 0 for(int i=0; i<8; i++){
            min += count[i];
        } int i=0; int i=0; i 0 i<8 i 8 i++ i++ i {
            min += count[i];
        } {
            min += count[i];
        } min += count[i] min count[i] count i int max = min+over; max min+over min over if(min==0 && over>=1){
            min=1;
        } min==0 && over>=1 min==0 min 0 over>=1 over 1 {
            min=1;
        } min=1 min 1 System.out.println(String.valueOf(min) + " " + String.valueOf(max)) System.out.println System.out System System.out String.valueOf(min) + " " + String.valueOf(max) String.valueOf(min) + " " + String.valueOf(max) String.valueOf(min) String.valueOf String min " " String.valueOf(max) String.valueOf String max String args[] args public class Main {
    public static void main(String args[]){
        Scanner scanner = new Scanner(System.in);
        int N  = scanner.nextInt();
        int[] count = new int[8];
        int over = 0;
        for(int i=0;i<8;i++){
            count[i] = 0;
        }
        for(int i=0; i<N; i++){
            int a = scanner.nextInt();
            if(a <= 399){
                count[0] = Math.min(1, count[0] + 1); 
            }else if(a<=799){
                count[1] = Math.min(1, count[1] + 1); 
            }else if(a<=1199){
                count[2] = Math.min(1, count[2] + 1); 
            }else if(a<=1599){
                count[3] = Math.min(1, count[3] + 1);
            }else if(a<=1999){
                count[4] = Math.min(1, count[4] + 1);
            }else if(a<=2399){
                count[5] = Math.min(1, count[5] + 1);
            }else if(a<=2799){
                count[6] = Math.min(1, count[6] + 1);
            }else if(a<=3199){
                count[7] = Math.min(1, count[7] + 1);
            }else{
                over++;
            }
        }
        int min = 0;
        for(int i=0; i<8; i++){
            min += count[i];
        }
        int max = min+over;
        if(min==0 && over>=1){
            min=1;
        }
        System.out.println(String.valueOf(min) + " " + String.valueOf(max));
    }
} public class Main {
    public static void main(String args[]){
        Scanner scanner = new Scanner(System.in);
        int N  = scanner.nextInt();
        int[] count = new int[8];
        int over = 0;
        for(int i=0;i<8;i++){
            count[i] = 0;
        }
        for(int i=0; i<N; i++){
            int a = scanner.nextInt();
            if(a <= 399){
                count[0] = Math.min(1, count[0] + 1); 
            }else if(a<=799){
                count[1] = Math.min(1, count[1] + 1); 
            }else if(a<=1199){
                count[2] = Math.min(1, count[2] + 1); 
            }else if(a<=1599){
                count[3] = Math.min(1, count[3] + 1);
            }else if(a<=1999){
                count[4] = Math.min(1, count[4] + 1);
            }else if(a<=2399){
                count[5] = Math.min(1, count[5] + 1);
            }else if(a<=2799){
                count[6] = Math.min(1, count[6] + 1);
            }else if(a<=3199){
                count[7] = Math.min(1, count[7] + 1);
            }else{
                over++;
            }
        }
        int min = 0;
        for(int i=0; i<8; i++){
            min += count[i];
        }
        int max = min+over;
        if(min==0 && over>=1){
            min=1;
        }
        System.out.println(String.valueOf(min) + " " + String.valueOf(max));
    }
} Main
import java.util.*;

public class Main {
    public static void main(String args[]){
        Scanner scanner = new Scanner(System.in);
        int N  = scanner.nextInt();
        int[] count = new int[8];
        int over = 0;
        for(int i=0;i<8;i++){
            count[i] = 0;
        }
        for(int i=0; i<N; i++){
            int a = scanner.nextInt();
            if(a <= 399){
                count[0] = Math.min(1, count[0] + 1); 
            }else if(a<=799){
                count[1] = Math.min(1, count[1] + 1); 
            }else if(a<=1199){
                count[2] = Math.min(1, count[2] + 1); 
            }else if(a<=1599){
                count[3] = Math.min(1, count[3] + 1);
            }else if(a<=1999){
                count[4] = Math.min(1, count[4] + 1);
            }else if(a<=2399){
                count[5] = Math.min(1, count[5] + 1);
            }else if(a<=2799){
                count[6] = Math.min(1, count[6] + 1);
            }else if(a<=3199){
                count[7] = Math.min(1, count[7] + 1);
            }else{
                over++;
            }
        }
        int min = 0;
        for(int i=0; i<8; i++){
            min += count[i];
        }
        int max = min+over;
        if(min==0 && over>=1){
            min=1;
        }
        System.out.println(String.valueOf(min) + " " + String.valueOf(max));
    }
}