import java.util.Scanner;
public class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    int n = sc.nextInt();
    int[] color = new int[9];
    int count = 0, countMax = 0;
    int allColor = 0;
    for(int i = 0; i<n; i++){
      int a = sc.nextInt();
      if(a <400) {color[0] = 1;}
      else if(a <800) {color[1] = 1;}
      else if(a <1200) {color[2] = 1;}
      else if(a <1600) {color[3] = 1;}
      else if(a <2000) {color[4] = 1;}
      else if(a <2400) {color[5] = 1;}
      else if(a <2800) {color[6] = 1;}
      else if(a <3200) {color[7] = 1;}
      else if(a <=4800) {allColor++;}
    }
    for(int i = 0; i<8; i++){
      count += color[i];
    }

    countMax = count + allColor;

    if((count == 0) && (allColor != 0)){
      System.out.print(1 + " ");
    }else{
      System.out.println(count + " ");
    }
    System.out.println(countMax);
  }
} import java.util.Scanner; Scanner java.util public class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    int n = sc.nextInt();
    int[] color = new int[9];
    int count = 0, countMax = 0;
    int allColor = 0;
    for(int i = 0; i<n; i++){
      int a = sc.nextInt();
      if(a <400) {color[0] = 1;}
      else if(a <800) {color[1] = 1;}
      else if(a <1200) {color[2] = 1;}
      else if(a <1600) {color[3] = 1;}
      else if(a <2000) {color[4] = 1;}
      else if(a <2400) {color[5] = 1;}
      else if(a <2800) {color[6] = 1;}
      else if(a <3200) {color[7] = 1;}
      else if(a <=4800) {allColor++;}
    }
    for(int i = 0; i<8; i++){
      count += color[i];
    }

    countMax = count + allColor;

    if((count == 0) && (allColor != 0)){
      System.out.print(1 + " ");
    }else{
      System.out.println(count + " ");
    }
    System.out.println(countMax);
  }
} Main public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    int n = sc.nextInt();
    int[] color = new int[9];
    int count = 0, countMax = 0;
    int allColor = 0;
    for(int i = 0; i<n; i++){
      int a = sc.nextInt();
      if(a <400) {color[0] = 1;}
      else if(a <800) {color[1] = 1;}
      else if(a <1200) {color[2] = 1;}
      else if(a <1600) {color[3] = 1;}
      else if(a <2000) {color[4] = 1;}
      else if(a <2400) {color[5] = 1;}
      else if(a <2800) {color[6] = 1;}
      else if(a <3200) {color[7] = 1;}
      else if(a <=4800) {allColor++;}
    }
    for(int i = 0; i<8; i++){
      count += color[i];
    }

    countMax = count + allColor;

    if((count == 0) && (allColor != 0)){
      System.out.print(1 + " ");
    }else{
      System.out.println(count + " ");
    }
    System.out.println(countMax);
  } main {
    Scanner sc = new Scanner(System.in);
    int n = sc.nextInt();
    int[] color = new int[9];
    int count = 0, countMax = 0;
    int allColor = 0;
    for(int i = 0; i<n; i++){
      int a = sc.nextInt();
      if(a <400) {color[0] = 1;}
      else if(a <800) {color[1] = 1;}
      else if(a <1200) {color[2] = 1;}
      else if(a <1600) {color[3] = 1;}
      else if(a <2000) {color[4] = 1;}
      else if(a <2400) {color[5] = 1;}
      else if(a <2800) {color[6] = 1;}
      else if(a <3200) {color[7] = 1;}
      else if(a <=4800) {allColor++;}
    }
    for(int i = 0; i<8; i++){
      count += color[i];
    }

    countMax = count + allColor;

    if((count == 0) && (allColor != 0)){
      System.out.print(1 + " ");
    }else{
      System.out.println(count + " ");
    }
    System.out.println(countMax);
  } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int n = sc.nextInt(); n sc.nextInt() sc.nextInt sc int[] color = new int[9]; color new int[9] 9 int count = 0 count 0 countMax = 0; countMax 0 int allColor = 0; allColor 0 for(int i = 0; i<n; i++){
      int a = sc.nextInt();
      if(a <400) {color[0] = 1;}
      else if(a <800) {color[1] = 1;}
      else if(a <1200) {color[2] = 1;}
      else if(a <1600) {color[3] = 1;}
      else if(a <2000) {color[4] = 1;}
      else if(a <2400) {color[5] = 1;}
      else if(a <2800) {color[6] = 1;}
      else if(a <3200) {color[7] = 1;}
      else if(a <=4800) {allColor++;}
    } int i = 0; int i = 0; i 0 i<n i n i++ i++ i {
      int a = sc.nextInt();
      if(a <400) {color[0] = 1;}
      else if(a <800) {color[1] = 1;}
      else if(a <1200) {color[2] = 1;}
      else if(a <1600) {color[3] = 1;}
      else if(a <2000) {color[4] = 1;}
      else if(a <2400) {color[5] = 1;}
      else if(a <2800) {color[6] = 1;}
      else if(a <3200) {color[7] = 1;}
      else if(a <=4800) {allColor++;}
    } {
      int a = sc.nextInt();
      if(a <400) {color[0] = 1;}
      else if(a <800) {color[1] = 1;}
      else if(a <1200) {color[2] = 1;}
      else if(a <1600) {color[3] = 1;}
      else if(a <2000) {color[4] = 1;}
      else if(a <2400) {color[5] = 1;}
      else if(a <2800) {color[6] = 1;}
      else if(a <3200) {color[7] = 1;}
      else if(a <=4800) {allColor++;}
    } int a = sc.nextInt(); a sc.nextInt() sc.nextInt sc if(a <400) {color[0] = 1;}
      else if(a <800) {color[1] = 1;}
      else if(a <1200) {color[2] = 1;}
      else if(a <1600) {color[3] = 1;}
      else if(a <2000) {color[4] = 1;}
      else if(a <2400) {color[5] = 1;}
      else if(a <2800) {color[6] = 1;}
      else if(a <3200) {color[7] = 1;}
      else if(a <=4800) {allColor++;} a <400 a 400 {color[0] = 1;} color[0] = 1 color[0] color 0 1 if(a <800) {color[1] = 1;}
      else if(a <1200) {color[2] = 1;}
      else if(a <1600) {color[3] = 1;}
      else if(a <2000) {color[4] = 1;}
      else if(a <2400) {color[5] = 1;}
      else if(a <2800) {color[6] = 1;}
      else if(a <3200) {color[7] = 1;}
      else if(a <=4800) {allColor++;} a <800 a 800 {color[1] = 1;} color[1] = 1 color[1] color 1 1 if(a <1200) {color[2] = 1;}
      else if(a <1600) {color[3] = 1;}
      else if(a <2000) {color[4] = 1;}
      else if(a <2400) {color[5] = 1;}
      else if(a <2800) {color[6] = 1;}
      else if(a <3200) {color[7] = 1;}
      else if(a <=4800) {allColor++;} a <1200 a 1200 {color[2] = 1;} color[2] = 1 color[2] color 2 1 if(a <1600) {color[3] = 1;}
      else if(a <2000) {color[4] = 1;}
      else if(a <2400) {color[5] = 1;}
      else if(a <2800) {color[6] = 1;}
      else if(a <3200) {color[7] = 1;}
      else if(a <=4800) {allColor++;} a <1600 a 1600 {color[3] = 1;} color[3] = 1 color[3] color 3 1 if(a <2000) {color[4] = 1;}
      else if(a <2400) {color[5] = 1;}
      else if(a <2800) {color[6] = 1;}
      else if(a <3200) {color[7] = 1;}
      else if(a <=4800) {allColor++;} a <2000 a 2000 {color[4] = 1;} color[4] = 1 color[4] color 4 1 if(a <2400) {color[5] = 1;}
      else if(a <2800) {color[6] = 1;}
      else if(a <3200) {color[7] = 1;}
      else if(a <=4800) {allColor++;} a <2400 a 2400 {color[5] = 1;} color[5] = 1 color[5] color 5 1 if(a <2800) {color[6] = 1;}
      else if(a <3200) {color[7] = 1;}
      else if(a <=4800) {allColor++;} a <2800 a 2800 {color[6] = 1;} color[6] = 1 color[6] color 6 1 if(a <3200) {color[7] = 1;}
      else if(a <=4800) {allColor++;} a <3200 a 3200 {color[7] = 1;} color[7] = 1 color[7] color 7 1 if(a <=4800) {allColor++;} a <=4800 a 4800 {allColor++;} allColor++ allColor for(int i = 0; i<8; i++){
      count += color[i];
    } int i = 0; int i = 0; i 0 i<8 i 8 i++ i++ i {
      count += color[i];
    } {
      count += color[i];
    } count += color[i] count color[i] color i countMax = count + allColor countMax count + allColor count allColor if((count == 0) && (allColor != 0)){
      System.out.print(1 + " ");
    }else{
      System.out.println(count + " ");
    } (count == 0) && (allColor != 0) (count == 0) count 0 (allColor != 0) allColor 0 {
      System.out.print(1 + " ");
    } System.out.print(1 + " ") System.out.print System.out System System.out 1 + " " 1 " " {
      System.out.println(count + " ");
    } System.out.println(count + " ") System.out.println System.out System System.out count + " " count " " System.out.println(countMax) System.out.println System.out System System.out countMax String[] args args public class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    int n = sc.nextInt();
    int[] color = new int[9];
    int count = 0, countMax = 0;
    int allColor = 0;
    for(int i = 0; i<n; i++){
      int a = sc.nextInt();
      if(a <400) {color[0] = 1;}
      else if(a <800) {color[1] = 1;}
      else if(a <1200) {color[2] = 1;}
      else if(a <1600) {color[3] = 1;}
      else if(a <2000) {color[4] = 1;}
      else if(a <2400) {color[5] = 1;}
      else if(a <2800) {color[6] = 1;}
      else if(a <3200) {color[7] = 1;}
      else if(a <=4800) {allColor++;}
    }
    for(int i = 0; i<8; i++){
      count += color[i];
    }

    countMax = count + allColor;

    if((count == 0) && (allColor != 0)){
      System.out.print(1 + " ");
    }else{
      System.out.println(count + " ");
    }
    System.out.println(countMax);
  }
} public class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    int n = sc.nextInt();
    int[] color = new int[9];
    int count = 0, countMax = 0;
    int allColor = 0;
    for(int i = 0; i<n; i++){
      int a = sc.nextInt();
      if(a <400) {color[0] = 1;}
      else if(a <800) {color[1] = 1;}
      else if(a <1200) {color[2] = 1;}
      else if(a <1600) {color[3] = 1;}
      else if(a <2000) {color[4] = 1;}
      else if(a <2400) {color[5] = 1;}
      else if(a <2800) {color[6] = 1;}
      else if(a <3200) {color[7] = 1;}
      else if(a <=4800) {allColor++;}
    }
    for(int i = 0; i<8; i++){
      count += color[i];
    }

    countMax = count + allColor;

    if((count == 0) && (allColor != 0)){
      System.out.print(1 + " ");
    }else{
      System.out.println(count + " ");
    }
    System.out.println(countMax);
  }
} Main
import java.util.Scanner;
public class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    int n = sc.nextInt();
    int[] color = new int[9];
    int count = 0, countMax = 0;
    int allColor = 0;
    for(int i = 0; i<n; i++){
      int a = sc.nextInt();
      if(a <400) {color[0] = 1;}
      else if(a <800) {color[1] = 1;}
      else if(a <1200) {color[2] = 1;}
      else if(a <1600) {color[3] = 1;}
      else if(a <2000) {color[4] = 1;}
      else if(a <2400) {color[5] = 1;}
      else if(a <2800) {color[6] = 1;}
      else if(a <3200) {color[7] = 1;}
      else if(a <=4800) {allColor++;}
    }
    for(int i = 0; i<8; i++){
      count += color[i];
    }

    countMax = count + allColor;

    if((count == 0) && (allColor != 0)){
      System.out.print(1 + " ");
    }else{
      System.out.println(count + " ");
    }
    System.out.println(countMax);
  }
}
