import java.io.IOException;

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

        int bit = 0;
        int over = 0;
        int num;

        int buf;
        StringBuilder builder = new StringBuilder();
        while((buf = System.in.read()) != '\n') {}
        while (true) {
            builder.setLength(0);
            while((buf = System.in.read()) != ' ' && buf != '\n') {
                builder.appendCodePoint(buf);
            }

            num = Integer.parseInt(builder.toString()) / 400;
            if (num < 1) {
                bit |= 1;
            } else if (num < 2) {
                bit |= 2;
            } else if (num < 3) {
                bit |= 4;
            } else if (num < 4) {
                bit |= 8;
            } else if (num < 5) {
                bit |= 16;
            } else if (num < 6) {
                bit |= 32;
            } else if (num < 7) {
                bit |= 64;
            } else if (num < 8) {
                bit |= 128;
            } else {
                over++;
            }
            
            if (buf == '\n') break;
        }

        int count = Integer.bitCount(bit);
        int max = count + over;

        if (count == 0) count = 1;

        System.out.print(count + " " + max);
    }
} import java.io.IOException; IOException java.io public class Main {
    public static void main(String[] args) throws IOException {

        int bit = 0;
        int over = 0;
        int num;

        int buf;
        StringBuilder builder = new StringBuilder();
        while((buf = System.in.read()) != '\n') {}
        while (true) {
            builder.setLength(0);
            while((buf = System.in.read()) != ' ' && buf != '\n') {
                builder.appendCodePoint(buf);
            }

            num = Integer.parseInt(builder.toString()) / 400;
            if (num < 1) {
                bit |= 1;
            } else if (num < 2) {
                bit |= 2;
            } else if (num < 3) {
                bit |= 4;
            } else if (num < 4) {
                bit |= 8;
            } else if (num < 5) {
                bit |= 16;
            } else if (num < 6) {
                bit |= 32;
            } else if (num < 7) {
                bit |= 64;
            } else if (num < 8) {
                bit |= 128;
            } else {
                over++;
            }
            
            if (buf == '\n') break;
        }

        int count = Integer.bitCount(bit);
        int max = count + over;

        if (count == 0) count = 1;

        System.out.print(count + " " + max);
    }
} Main public static void main(String[] args) throws IOException {

        int bit = 0;
        int over = 0;
        int num;

        int buf;
        StringBuilder builder = new StringBuilder();
        while((buf = System.in.read()) != '\n') {}
        while (true) {
            builder.setLength(0);
            while((buf = System.in.read()) != ' ' && buf != '\n') {
                builder.appendCodePoint(buf);
            }

            num = Integer.parseInt(builder.toString()) / 400;
            if (num < 1) {
                bit |= 1;
            } else if (num < 2) {
                bit |= 2;
            } else if (num < 3) {
                bit |= 4;
            } else if (num < 4) {
                bit |= 8;
            } else if (num < 5) {
                bit |= 16;
            } else if (num < 6) {
                bit |= 32;
            } else if (num < 7) {
                bit |= 64;
            } else if (num < 8) {
                bit |= 128;
            } else {
                over++;
            }
            
            if (buf == '\n') break;
        }

        int count = Integer.bitCount(bit);
        int max = count + over;

        if (count == 0) count = 1;

        System.out.print(count + " " + max);
    } main {

        int bit = 0;
        int over = 0;
        int num;

        int buf;
        StringBuilder builder = new StringBuilder();
        while((buf = System.in.read()) != '\n') {}
        while (true) {
            builder.setLength(0);
            while((buf = System.in.read()) != ' ' && buf != '\n') {
                builder.appendCodePoint(buf);
            }

            num = Integer.parseInt(builder.toString()) / 400;
            if (num < 1) {
                bit |= 1;
            } else if (num < 2) {
                bit |= 2;
            } else if (num < 3) {
                bit |= 4;
            } else if (num < 4) {
                bit |= 8;
            } else if (num < 5) {
                bit |= 16;
            } else if (num < 6) {
                bit |= 32;
            } else if (num < 7) {
                bit |= 64;
            } else if (num < 8) {
                bit |= 128;
            } else {
                over++;
            }
            
            if (buf == '\n') break;
        }

        int count = Integer.bitCount(bit);
        int max = count + over;

        if (count == 0) count = 1;

        System.out.print(count + " " + max);
    } int bit = 0; bit 0 int over = 0; over 0 int num; num int buf; buf StringBuilder builder = new StringBuilder(); builder new StringBuilder() while((buf = System.in.read()) != '\n') {} (buf = System.in.read()) != '\n' (buf = System.in.read()) buf System.in.read() System.in.read System.in System System.in '\n' {} while (true) {
            builder.setLength(0);
            while((buf = System.in.read()) != ' ' && buf != '\n') {
                builder.appendCodePoint(buf);
            }

            num = Integer.parseInt(builder.toString()) / 400;
            if (num < 1) {
                bit |= 1;
            } else if (num < 2) {
                bit |= 2;
            } else if (num < 3) {
                bit |= 4;
            } else if (num < 4) {
                bit |= 8;
            } else if (num < 5) {
                bit |= 16;
            } else if (num < 6) {
                bit |= 32;
            } else if (num < 7) {
                bit |= 64;
            } else if (num < 8) {
                bit |= 128;
            } else {
                over++;
            }
            
            if (buf == '\n') break;
        } true {
            builder.setLength(0);
            while((buf = System.in.read()) != ' ' && buf != '\n') {
                builder.appendCodePoint(buf);
            }

            num = Integer.parseInt(builder.toString()) / 400;
            if (num < 1) {
                bit |= 1;
            } else if (num < 2) {
                bit |= 2;
            } else if (num < 3) {
                bit |= 4;
            } else if (num < 4) {
                bit |= 8;
            } else if (num < 5) {
                bit |= 16;
            } else if (num < 6) {
                bit |= 32;
            } else if (num < 7) {
                bit |= 64;
            } else if (num < 8) {
                bit |= 128;
            } else {
                over++;
            }
            
            if (buf == '\n') break;
        } builder.setLength(0) builder.setLength builder 0 while((buf = System.in.read()) != ' ' && buf != '\n') {
                builder.appendCodePoint(buf);
            } (buf = System.in.read()) != ' ' && buf != '\n' (buf = System.in.read()) != ' ' (buf = System.in.read()) buf System.in.read() System.in.read System.in System System.in ' ' buf != '\n' buf '\n' {
                builder.appendCodePoint(buf);
            } builder.appendCodePoint(buf) builder.appendCodePoint builder buf num = Integer.parseInt(builder.toString()) / 400 num Integer.parseInt(builder.toString()) / 400 Integer.parseInt(builder.toString()) Integer.parseInt Integer builder.toString() builder.toString builder 400 if (num < 1) {
                bit |= 1;
            } else if (num < 2) {
                bit |= 2;
            } else if (num < 3) {
                bit |= 4;
            } else if (num < 4) {
                bit |= 8;
            } else if (num < 5) {
                bit |= 16;
            } else if (num < 6) {
                bit |= 32;
            } else if (num < 7) {
                bit |= 64;
            } else if (num < 8) {
                bit |= 128;
            } else {
                over++;
            } num < 1 num 1 {
                bit |= 1;
            } bit |= 1 bit 1 if (num < 2) {
                bit |= 2;
            } else if (num < 3) {
                bit |= 4;
            } else if (num < 4) {
                bit |= 8;
            } else if (num < 5) {
                bit |= 16;
            } else if (num < 6) {
                bit |= 32;
            } else if (num < 7) {
                bit |= 64;
            } else if (num < 8) {
                bit |= 128;
            } else {
                over++;
            } num < 2 num 2 {
                bit |= 2;
            } bit |= 2 bit 2 if (num < 3) {
                bit |= 4;
            } else if (num < 4) {
                bit |= 8;
            } else if (num < 5) {
                bit |= 16;
            } else if (num < 6) {
                bit |= 32;
            } else if (num < 7) {
                bit |= 64;
            } else if (num < 8) {
                bit |= 128;
            } else {
                over++;
            } num < 3 num 3 {
                bit |= 4;
            } bit |= 4 bit 4 if (num < 4) {
                bit |= 8;
            } else if (num < 5) {
                bit |= 16;
            } else if (num < 6) {
                bit |= 32;
            } else if (num < 7) {
                bit |= 64;
            } else if (num < 8) {
                bit |= 128;
            } else {
                over++;
            } num < 4 num 4 {
                bit |= 8;
            } bit |= 8 bit 8 if (num < 5) {
                bit |= 16;
            } else if (num < 6) {
                bit |= 32;
            } else if (num < 7) {
                bit |= 64;
            } else if (num < 8) {
                bit |= 128;
            } else {
                over++;
            } num < 5 num 5 {
                bit |= 16;
            } bit |= 16 bit 16 if (num < 6) {
                bit |= 32;
            } else if (num < 7) {
                bit |= 64;
            } else if (num < 8) {
                bit |= 128;
            } else {
                over++;
            } num < 6 num 6 {
                bit |= 32;
            } bit |= 32 bit 32 if (num < 7) {
                bit |= 64;
            } else if (num < 8) {
                bit |= 128;
            } else {
                over++;
            } num < 7 num 7 {
                bit |= 64;
            } bit |= 64 bit 64 if (num < 8) {
                bit |= 128;
            } else {
                over++;
            } num < 8 num 8 {
                bit |= 128;
            } bit |= 128 bit 128 {
                over++;
            } over++ over if (buf == '\n') break; buf == '\n' buf '\n' break; int count = Integer.bitCount(bit); count Integer.bitCount(bit) Integer.bitCount Integer bit int max = count + over; max count + over count over if (count == 0) count = 1; count == 0 count 0 count = 1 count 1 System.out.print(count + " " + max) System.out.print System.out System System.out count + " " + max count + " " + max count " " max String[] args args public class Main {
    public static void main(String[] args) throws IOException {

        int bit = 0;
        int over = 0;
        int num;

        int buf;
        StringBuilder builder = new StringBuilder();
        while((buf = System.in.read()) != '\n') {}
        while (true) {
            builder.setLength(0);
            while((buf = System.in.read()) != ' ' && buf != '\n') {
                builder.appendCodePoint(buf);
            }

            num = Integer.parseInt(builder.toString()) / 400;
            if (num < 1) {
                bit |= 1;
            } else if (num < 2) {
                bit |= 2;
            } else if (num < 3) {
                bit |= 4;
            } else if (num < 4) {
                bit |= 8;
            } else if (num < 5) {
                bit |= 16;
            } else if (num < 6) {
                bit |= 32;
            } else if (num < 7) {
                bit |= 64;
            } else if (num < 8) {
                bit |= 128;
            } else {
                over++;
            }
            
            if (buf == '\n') break;
        }

        int count = Integer.bitCount(bit);
        int max = count + over;

        if (count == 0) count = 1;

        System.out.print(count + " " + max);
    }
} public class Main {
    public static void main(String[] args) throws IOException {

        int bit = 0;
        int over = 0;
        int num;

        int buf;
        StringBuilder builder = new StringBuilder();
        while((buf = System.in.read()) != '\n') {}
        while (true) {
            builder.setLength(0);
            while((buf = System.in.read()) != ' ' && buf != '\n') {
                builder.appendCodePoint(buf);
            }

            num = Integer.parseInt(builder.toString()) / 400;
            if (num < 1) {
                bit |= 1;
            } else if (num < 2) {
                bit |= 2;
            } else if (num < 3) {
                bit |= 4;
            } else if (num < 4) {
                bit |= 8;
            } else if (num < 5) {
                bit |= 16;
            } else if (num < 6) {
                bit |= 32;
            } else if (num < 7) {
                bit |= 64;
            } else if (num < 8) {
                bit |= 128;
            } else {
                over++;
            }
            
            if (buf == '\n') break;
        }

        int count = Integer.bitCount(bit);
        int max = count + over;

        if (count == 0) count = 1;

        System.out.print(count + " " + max);
    }
} Main
import java.io.IOException;

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

        int bit = 0;
        int over = 0;
        int num;

        int buf;
        StringBuilder builder = new StringBuilder();
        while((buf = System.in.read()) != '\n') {}
        while (true) {
            builder.setLength(0);
            while((buf = System.in.read()) != ' ' && buf != '\n') {
                builder.appendCodePoint(buf);
            }

            num = Integer.parseInt(builder.toString()) / 400;
            if (num < 1) {
                bit |= 1;
            } else if (num < 2) {
                bit |= 2;
            } else if (num < 3) {
                bit |= 4;
            } else if (num < 4) {
                bit |= 8;
            } else if (num < 5) {
                bit |= 16;
            } else if (num < 6) {
                bit |= 32;
            } else if (num < 7) {
                bit |= 64;
            } else if (num < 8) {
                bit |= 128;
            } else {
                over++;
            }
            
            if (buf == '\n') break;
        }

        int count = Integer.bitCount(bit);
        int max = count + over;

        if (count == 0) count = 1;

        System.out.print(count + " " + max);
    }
}
