import java.util.*;
import java.lang.*;

class Main {
    
    public static void main(String[] areg) {
        Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
        int[] a = new int[N];
        for (int i = 0; i < N; i++)
            a[i] = sc.nextInt();
		sc.close();
        
        int bit = 0;
        int free = 0;
        for (int i = 0; i < N; i++) {
            if (a[i] < 400)
                bit |= (1 << 0);
            if (a[i] >= 400 && a[i] < 800)
                bit |= (1 << 1);
            if (a[i] >= 800 && a[i] < 1200)
                bit |= (1 << 2);
            if (a[i] >= 1200 && a[i] < 1600)
                bit |= (1 << 3);
            if (a[i] >= 1600 && a[i] < 2000)
                bit |= (1 << 4);
            if (a[i] >= 2000 && a[i] < 2400)
                bit |= (1 << 5);
            if (a[i] >= 2400 && a[i] < 2800)
                bit |= (1 << 6);
            if (a[i] >= 2800 && a[i] < 3200)
                bit |= (1 << 7);
            if (a[i] >= 3200)
                free++;
        }
        
        int count = 0;
        for (; bit != 0 ; bit &= bit - 1)
            count++;
        
        System.out.print(Math.max(1, count));
        System.out.print(" ");
        System.out.print(count + free);
    }
} import java.util.*; util.* java import java.lang.*; lang.* java class Main {
    
    public static void main(String[] areg) {
        Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
        int[] a = new int[N];
        for (int i = 0; i < N; i++)
            a[i] = sc.nextInt();
		sc.close();
        
        int bit = 0;
        int free = 0;
        for (int i = 0; i < N; i++) {
            if (a[i] < 400)
                bit |= (1 << 0);
            if (a[i] >= 400 && a[i] < 800)
                bit |= (1 << 1);
            if (a[i] >= 800 && a[i] < 1200)
                bit |= (1 << 2);
            if (a[i] >= 1200 && a[i] < 1600)
                bit |= (1 << 3);
            if (a[i] >= 1600 && a[i] < 2000)
                bit |= (1 << 4);
            if (a[i] >= 2000 && a[i] < 2400)
                bit |= (1 << 5);
            if (a[i] >= 2400 && a[i] < 2800)
                bit |= (1 << 6);
            if (a[i] >= 2800 && a[i] < 3200)
                bit |= (1 << 7);
            if (a[i] >= 3200)
                free++;
        }
        
        int count = 0;
        for (; bit != 0 ; bit &= bit - 1)
            count++;
        
        System.out.print(Math.max(1, count));
        System.out.print(" ");
        System.out.print(count + free);
    }
} Main public static void main(String[] areg) {
        Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
        int[] a = new int[N];
        for (int i = 0; i < N; i++)
            a[i] = sc.nextInt();
		sc.close();
        
        int bit = 0;
        int free = 0;
        for (int i = 0; i < N; i++) {
            if (a[i] < 400)
                bit |= (1 << 0);
            if (a[i] >= 400 && a[i] < 800)
                bit |= (1 << 1);
            if (a[i] >= 800 && a[i] < 1200)
                bit |= (1 << 2);
            if (a[i] >= 1200 && a[i] < 1600)
                bit |= (1 << 3);
            if (a[i] >= 1600 && a[i] < 2000)
                bit |= (1 << 4);
            if (a[i] >= 2000 && a[i] < 2400)
                bit |= (1 << 5);
            if (a[i] >= 2400 && a[i] < 2800)
                bit |= (1 << 6);
            if (a[i] >= 2800 && a[i] < 3200)
                bit |= (1 << 7);
            if (a[i] >= 3200)
                free++;
        }
        
        int count = 0;
        for (; bit != 0 ; bit &= bit - 1)
            count++;
        
        System.out.print(Math.max(1, count));
        System.out.print(" ");
        System.out.print(count + free);
    } main {
        Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
        int[] a = new int[N];
        for (int i = 0; i < N; i++)
            a[i] = sc.nextInt();
		sc.close();
        
        int bit = 0;
        int free = 0;
        for (int i = 0; i < N; i++) {
            if (a[i] < 400)
                bit |= (1 << 0);
            if (a[i] >= 400 && a[i] < 800)
                bit |= (1 << 1);
            if (a[i] >= 800 && a[i] < 1200)
                bit |= (1 << 2);
            if (a[i] >= 1200 && a[i] < 1600)
                bit |= (1 << 3);
            if (a[i] >= 1600 && a[i] < 2000)
                bit |= (1 << 4);
            if (a[i] >= 2000 && a[i] < 2400)
                bit |= (1 << 5);
            if (a[i] >= 2400 && a[i] < 2800)
                bit |= (1 << 6);
            if (a[i] >= 2800 && a[i] < 3200)
                bit |= (1 << 7);
            if (a[i] >= 3200)
                free++;
        }
        
        int count = 0;
        for (; bit != 0 ; bit &= bit - 1)
            count++;
        
        System.out.print(Math.max(1, count));
        System.out.print(" ");
        System.out.print(count + free);
    } 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 for (int i = 0; i < N; i++)
            a[i] = sc.nextInt(); int i = 0; int i = 0; i 0 i < N i N i++ i++ i a[i] = sc.nextInt(); a[i] = sc.nextInt() a[i] a i sc.nextInt() sc.nextInt sc sc.close() sc.close sc int bit = 0; bit 0 int free = 0; free 0 for (int i = 0; i < N; i++) {
            if (a[i] < 400)
                bit |= (1 << 0);
            if (a[i] >= 400 && a[i] < 800)
                bit |= (1 << 1);
            if (a[i] >= 800 && a[i] < 1200)
                bit |= (1 << 2);
            if (a[i] >= 1200 && a[i] < 1600)
                bit |= (1 << 3);
            if (a[i] >= 1600 && a[i] < 2000)
                bit |= (1 << 4);
            if (a[i] >= 2000 && a[i] < 2400)
                bit |= (1 << 5);
            if (a[i] >= 2400 && a[i] < 2800)
                bit |= (1 << 6);
            if (a[i] >= 2800 && a[i] < 3200)
                bit |= (1 << 7);
            if (a[i] >= 3200)
                free++;
        } int i = 0; int i = 0; i 0 i < N i N i++ i++ i {
            if (a[i] < 400)
                bit |= (1 << 0);
            if (a[i] >= 400 && a[i] < 800)
                bit |= (1 << 1);
            if (a[i] >= 800 && a[i] < 1200)
                bit |= (1 << 2);
            if (a[i] >= 1200 && a[i] < 1600)
                bit |= (1 << 3);
            if (a[i] >= 1600 && a[i] < 2000)
                bit |= (1 << 4);
            if (a[i] >= 2000 && a[i] < 2400)
                bit |= (1 << 5);
            if (a[i] >= 2400 && a[i] < 2800)
                bit |= (1 << 6);
            if (a[i] >= 2800 && a[i] < 3200)
                bit |= (1 << 7);
            if (a[i] >= 3200)
                free++;
        } {
            if (a[i] < 400)
                bit |= (1 << 0);
            if (a[i] >= 400 && a[i] < 800)
                bit |= (1 << 1);
            if (a[i] >= 800 && a[i] < 1200)
                bit |= (1 << 2);
            if (a[i] >= 1200 && a[i] < 1600)
                bit |= (1 << 3);
            if (a[i] >= 1600 && a[i] < 2000)
                bit |= (1 << 4);
            if (a[i] >= 2000 && a[i] < 2400)
                bit |= (1 << 5);
            if (a[i] >= 2400 && a[i] < 2800)
                bit |= (1 << 6);
            if (a[i] >= 2800 && a[i] < 3200)
                bit |= (1 << 7);
            if (a[i] >= 3200)
                free++;
        } if (a[i] < 400)
                bit |= (1 << 0); a[i] < 400 a[i] a i 400 bit |= (1 << 0) bit (1 << 0) 1 0 if (a[i] >= 400 && a[i] < 800)
                bit |= (1 << 1); a[i] >= 400 && a[i] < 800 a[i] >= 400 a[i] a i 400 a[i] < 800 a[i] a i 800 bit |= (1 << 1) bit (1 << 1) 1 1 if (a[i] >= 800 && a[i] < 1200)
                bit |= (1 << 2); a[i] >= 800 && a[i] < 1200 a[i] >= 800 a[i] a i 800 a[i] < 1200 a[i] a i 1200 bit |= (1 << 2) bit (1 << 2) 1 2 if (a[i] >= 1200 && a[i] < 1600)
                bit |= (1 << 3); a[i] >= 1200 && a[i] < 1600 a[i] >= 1200 a[i] a i 1200 a[i] < 1600 a[i] a i 1600 bit |= (1 << 3) bit (1 << 3) 1 3 if (a[i] >= 1600 && a[i] < 2000)
                bit |= (1 << 4); a[i] >= 1600 && a[i] < 2000 a[i] >= 1600 a[i] a i 1600 a[i] < 2000 a[i] a i 2000 bit |= (1 << 4) bit (1 << 4) 1 4 if (a[i] >= 2000 && a[i] < 2400)
                bit |= (1 << 5); a[i] >= 2000 && a[i] < 2400 a[i] >= 2000 a[i] a i 2000 a[i] < 2400 a[i] a i 2400 bit |= (1 << 5) bit (1 << 5) 1 5 if (a[i] >= 2400 && a[i] < 2800)
                bit |= (1 << 6); a[i] >= 2400 && a[i] < 2800 a[i] >= 2400 a[i] a i 2400 a[i] < 2800 a[i] a i 2800 bit |= (1 << 6) bit (1 << 6) 1 6 if (a[i] >= 2800 && a[i] < 3200)
                bit |= (1 << 7); a[i] >= 2800 && a[i] < 3200 a[i] >= 2800 a[i] a i 2800 a[i] < 3200 a[i] a i 3200 bit |= (1 << 7) bit (1 << 7) 1 7 if (a[i] >= 3200)
                free++; a[i] >= 3200 a[i] a i 3200 free++ free int count = 0; count 0 for (; bit != 0 ; bit &= bit - 1)
            count++; ; bit != 0 bit 0 bit &= bit - 1 bit &= bit - 1 bit bit - 1 bit 1 count++; count++ count System.out.print(Math.max(1, count)) System.out.print System.out System System.out Math.max(1, count) Math.max Math 1 count System.out.print(" ") System.out.print System.out System System.out " " System.out.print(count + free) System.out.print System.out System System.out count + free count free String[] areg areg
import java.util.*;
import java.lang.*;

class Main {
    
    public static void main(String[] areg) {
        Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
        int[] a = new int[N];
        for (int i = 0; i < N; i++)
            a[i] = sc.nextInt();
		sc.close();
        
        int bit = 0;
        int free = 0;
        for (int i = 0; i < N; i++) {
            if (a[i] < 400)
                bit |= (1 << 0);
            if (a[i] >= 400 && a[i] < 800)
                bit |= (1 << 1);
            if (a[i] >= 800 && a[i] < 1200)
                bit |= (1 << 2);
            if (a[i] >= 1200 && a[i] < 1600)
                bit |= (1 << 3);
            if (a[i] >= 1600 && a[i] < 2000)
                bit |= (1 << 4);
            if (a[i] >= 2000 && a[i] < 2400)
                bit |= (1 << 5);
            if (a[i] >= 2400 && a[i] < 2800)
                bit |= (1 << 6);
            if (a[i] >= 2800 && a[i] < 3200)
                bit |= (1 << 7);
            if (a[i] >= 3200)
                free++;
        }
        
        int count = 0;
        for (; bit != 0 ; bit &= bit - 1)
            count++;
        
        System.out.print(Math.max(1, count));
        System.out.print(" ");
        System.out.print(count + free);
    }
}