import java.util.Scanner;

public class Main {

  public static void main(String[] args) {

    Scanner sc = new Scanner(System.in);

    int n = Integer.parseInt(sc.next());

    int[] a = new int[n];

    for (int i = 0; i < n; i++) {
      a[i] = Integer.parseInt(sc.next()) / 400;
    }

    int color = 0;
    int free = 0;
    boolean[] flag = new boolean[8];
    for (int i = 0; i < n; i++) {
      switch (a[i]) {
        case 0:
          if (!flag[0]) {
            color++;
            flag[0] = true;
          }
          break;
        case 1:
          if (!flag[1]) {
            color++;
            flag[1] = true;
          }
          break;
        case 2:
          if (!flag[2]) {
            color++;
            flag[2] = true;
          }
          break;
        case 3:
          if (!flag[3]) {
            color++;
            flag[3] = true;
          }
          break;
        case 4:
          if (!flag[4]) {
            color++;
            flag[4] = true;
          }
          break;
        case 5:
          if (!flag[5]) {
            color++;
            flag[5] = true;
          }
          break;
        case 6:
          if (!flag[6]) {
            color++;
            flag[6] = true;
          }
          break;
        case 7:
          if (!flag[7]) {
            color++;
            flag[7] = true;
          }
          break;
        case 8:
        default:
          free++;
          break;
      }

    }
    System.out.print(Math.max(color, 1) + " ");
    System.out.println(color + free);
    sc.close();
  }
} import java.util.Scanner; Scanner java.util public class Main {

  public static void main(String[] args) {

    Scanner sc = new Scanner(System.in);

    int n = Integer.parseInt(sc.next());

    int[] a = new int[n];

    for (int i = 0; i < n; i++) {
      a[i] = Integer.parseInt(sc.next()) / 400;
    }

    int color = 0;
    int free = 0;
    boolean[] flag = new boolean[8];
    for (int i = 0; i < n; i++) {
      switch (a[i]) {
        case 0:
          if (!flag[0]) {
            color++;
            flag[0] = true;
          }
          break;
        case 1:
          if (!flag[1]) {
            color++;
            flag[1] = true;
          }
          break;
        case 2:
          if (!flag[2]) {
            color++;
            flag[2] = true;
          }
          break;
        case 3:
          if (!flag[3]) {
            color++;
            flag[3] = true;
          }
          break;
        case 4:
          if (!flag[4]) {
            color++;
            flag[4] = true;
          }
          break;
        case 5:
          if (!flag[5]) {
            color++;
            flag[5] = true;
          }
          break;
        case 6:
          if (!flag[6]) {
            color++;
            flag[6] = true;
          }
          break;
        case 7:
          if (!flag[7]) {
            color++;
            flag[7] = true;
          }
          break;
        case 8:
        default:
          free++;
          break;
      }

    }
    System.out.print(Math.max(color, 1) + " ");
    System.out.println(color + free);
    sc.close();
  }
} Main public static void main(String[] args) {

    Scanner sc = new Scanner(System.in);

    int n = Integer.parseInt(sc.next());

    int[] a = new int[n];

    for (int i = 0; i < n; i++) {
      a[i] = Integer.parseInt(sc.next()) / 400;
    }

    int color = 0;
    int free = 0;
    boolean[] flag = new boolean[8];
    for (int i = 0; i < n; i++) {
      switch (a[i]) {
        case 0:
          if (!flag[0]) {
            color++;
            flag[0] = true;
          }
          break;
        case 1:
          if (!flag[1]) {
            color++;
            flag[1] = true;
          }
          break;
        case 2:
          if (!flag[2]) {
            color++;
            flag[2] = true;
          }
          break;
        case 3:
          if (!flag[3]) {
            color++;
            flag[3] = true;
          }
          break;
        case 4:
          if (!flag[4]) {
            color++;
            flag[4] = true;
          }
          break;
        case 5:
          if (!flag[5]) {
            color++;
            flag[5] = true;
          }
          break;
        case 6:
          if (!flag[6]) {
            color++;
            flag[6] = true;
          }
          break;
        case 7:
          if (!flag[7]) {
            color++;
            flag[7] = true;
          }
          break;
        case 8:
        default:
          free++;
          break;
      }

    }
    System.out.print(Math.max(color, 1) + " ");
    System.out.println(color + free);
    sc.close();
  } main {

    Scanner sc = new Scanner(System.in);

    int n = Integer.parseInt(sc.next());

    int[] a = new int[n];

    for (int i = 0; i < n; i++) {
      a[i] = Integer.parseInt(sc.next()) / 400;
    }

    int color = 0;
    int free = 0;
    boolean[] flag = new boolean[8];
    for (int i = 0; i < n; i++) {
      switch (a[i]) {
        case 0:
          if (!flag[0]) {
            color++;
            flag[0] = true;
          }
          break;
        case 1:
          if (!flag[1]) {
            color++;
            flag[1] = true;
          }
          break;
        case 2:
          if (!flag[2]) {
            color++;
            flag[2] = true;
          }
          break;
        case 3:
          if (!flag[3]) {
            color++;
            flag[3] = true;
          }
          break;
        case 4:
          if (!flag[4]) {
            color++;
            flag[4] = true;
          }
          break;
        case 5:
          if (!flag[5]) {
            color++;
            flag[5] = true;
          }
          break;
        case 6:
          if (!flag[6]) {
            color++;
            flag[6] = true;
          }
          break;
        case 7:
          if (!flag[7]) {
            color++;
            flag[7] = true;
          }
          break;
        case 8:
        default:
          free++;
          break;
      }

    }
    System.out.print(Math.max(color, 1) + " ");
    System.out.println(color + free);
    sc.close();
  } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int n = Integer.parseInt(sc.next()); n Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc int[] a = new int[n]; a new int[n] n for (int i = 0; i < n; i++) {
      a[i] = Integer.parseInt(sc.next()) / 400;
    } int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
      a[i] = Integer.parseInt(sc.next()) / 400;
    } {
      a[i] = Integer.parseInt(sc.next()) / 400;
    } a[i] = Integer.parseInt(sc.next()) / 400 a[i] a i Integer.parseInt(sc.next()) / 400 Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc 400 int color = 0; color 0 int free = 0; free 0 boolean[] flag = new boolean[8]; flag new boolean[8] 8 for (int i = 0; i < n; i++) {
      switch (a[i]) {
        case 0:
          if (!flag[0]) {
            color++;
            flag[0] = true;
          }
          break;
        case 1:
          if (!flag[1]) {
            color++;
            flag[1] = true;
          }
          break;
        case 2:
          if (!flag[2]) {
            color++;
            flag[2] = true;
          }
          break;
        case 3:
          if (!flag[3]) {
            color++;
            flag[3] = true;
          }
          break;
        case 4:
          if (!flag[4]) {
            color++;
            flag[4] = true;
          }
          break;
        case 5:
          if (!flag[5]) {
            color++;
            flag[5] = true;
          }
          break;
        case 6:
          if (!flag[6]) {
            color++;
            flag[6] = true;
          }
          break;
        case 7:
          if (!flag[7]) {
            color++;
            flag[7] = true;
          }
          break;
        case 8:
        default:
          free++;
          break;
      }

    } int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
      switch (a[i]) {
        case 0:
          if (!flag[0]) {
            color++;
            flag[0] = true;
          }
          break;
        case 1:
          if (!flag[1]) {
            color++;
            flag[1] = true;
          }
          break;
        case 2:
          if (!flag[2]) {
            color++;
            flag[2] = true;
          }
          break;
        case 3:
          if (!flag[3]) {
            color++;
            flag[3] = true;
          }
          break;
        case 4:
          if (!flag[4]) {
            color++;
            flag[4] = true;
          }
          break;
        case 5:
          if (!flag[5]) {
            color++;
            flag[5] = true;
          }
          break;
        case 6:
          if (!flag[6]) {
            color++;
            flag[6] = true;
          }
          break;
        case 7:
          if (!flag[7]) {
            color++;
            flag[7] = true;
          }
          break;
        case 8:
        default:
          free++;
          break;
      }

    } {
      switch (a[i]) {
        case 0:
          if (!flag[0]) {
            color++;
            flag[0] = true;
          }
          break;
        case 1:
          if (!flag[1]) {
            color++;
            flag[1] = true;
          }
          break;
        case 2:
          if (!flag[2]) {
            color++;
            flag[2] = true;
          }
          break;
        case 3:
          if (!flag[3]) {
            color++;
            flag[3] = true;
          }
          break;
        case 4:
          if (!flag[4]) {
            color++;
            flag[4] = true;
          }
          break;
        case 5:
          if (!flag[5]) {
            color++;
            flag[5] = true;
          }
          break;
        case 6:
          if (!flag[6]) {
            color++;
            flag[6] = true;
          }
          break;
        case 7:
          if (!flag[7]) {
            color++;
            flag[7] = true;
          }
          break;
        case 8:
        default:
          free++;
          break;
      }

    } switch (a[i]) {
        case 0:
          if (!flag[0]) {
            color++;
            flag[0] = true;
          }
          break;
        case 1:
          if (!flag[1]) {
            color++;
            flag[1] = true;
          }
          break;
        case 2:
          if (!flag[2]) {
            color++;
            flag[2] = true;
          }
          break;
        case 3:
          if (!flag[3]) {
            color++;
            flag[3] = true;
          }
          break;
        case 4:
          if (!flag[4]) {
            color++;
            flag[4] = true;
          }
          break;
        case 5:
          if (!flag[5]) {
            color++;
            flag[5] = true;
          }
          break;
        case 6:
          if (!flag[6]) {
            color++;
            flag[6] = true;
          }
          break;
        case 7:
          if (!flag[7]) {
            color++;
            flag[7] = true;
          }
          break;
        case 8:
        default:
          free++;
          break;
      } a[i] a i case 0: 0 case 0: if (!flag[0]) {
            color++;
            flag[0] = true;
          } !flag[0] flag[0] flag 0 {
            color++;
            flag[0] = true;
          } color++ color flag[0] = true flag[0] flag 0 true break; case 1: 1 case 1: if (!flag[1]) {
            color++;
            flag[1] = true;
          } !flag[1] flag[1] flag 1 {
            color++;
            flag[1] = true;
          } color++ color flag[1] = true flag[1] flag 1 true break; case 2: 2 case 2: if (!flag[2]) {
            color++;
            flag[2] = true;
          } !flag[2] flag[2] flag 2 {
            color++;
            flag[2] = true;
          } color++ color flag[2] = true flag[2] flag 2 true break; case 3: 3 case 3: if (!flag[3]) {
            color++;
            flag[3] = true;
          } !flag[3] flag[3] flag 3 {
            color++;
            flag[3] = true;
          } color++ color flag[3] = true flag[3] flag 3 true break; case 4: 4 case 4: if (!flag[4]) {
            color++;
            flag[4] = true;
          } !flag[4] flag[4] flag 4 {
            color++;
            flag[4] = true;
          } color++ color flag[4] = true flag[4] flag 4 true break; case 5: 5 case 5: if (!flag[5]) {
            color++;
            flag[5] = true;
          } !flag[5] flag[5] flag 5 {
            color++;
            flag[5] = true;
          } color++ color flag[5] = true flag[5] flag 5 true break; case 6: 6 case 6: if (!flag[6]) {
            color++;
            flag[6] = true;
          } !flag[6] flag[6] flag 6 {
            color++;
            flag[6] = true;
          } color++ color flag[6] = true flag[6] flag 6 true break; case 7: 7 case 7: if (!flag[7]) {
            color++;
            flag[7] = true;
          } !flag[7] flag[7] flag 7 {
            color++;
            flag[7] = true;
          } color++ color flag[7] = true flag[7] flag 7 true break; case 8: 8 case 8: default: default: free++ free break; System.out.print(Math.max(color, 1) + " ") System.out.print System.out System System.out Math.max(color, 1) + " " Math.max(color, 1) Math.max Math color 1 " " System.out.println(color + free) System.out.println System.out System System.out color + free color free sc.close() sc.close sc String[] args args public class Main {

  public static void main(String[] args) {

    Scanner sc = new Scanner(System.in);

    int n = Integer.parseInt(sc.next());

    int[] a = new int[n];

    for (int i = 0; i < n; i++) {
      a[i] = Integer.parseInt(sc.next()) / 400;
    }

    int color = 0;
    int free = 0;
    boolean[] flag = new boolean[8];
    for (int i = 0; i < n; i++) {
      switch (a[i]) {
        case 0:
          if (!flag[0]) {
            color++;
            flag[0] = true;
          }
          break;
        case 1:
          if (!flag[1]) {
            color++;
            flag[1] = true;
          }
          break;
        case 2:
          if (!flag[2]) {
            color++;
            flag[2] = true;
          }
          break;
        case 3:
          if (!flag[3]) {
            color++;
            flag[3] = true;
          }
          break;
        case 4:
          if (!flag[4]) {
            color++;
            flag[4] = true;
          }
          break;
        case 5:
          if (!flag[5]) {
            color++;
            flag[5] = true;
          }
          break;
        case 6:
          if (!flag[6]) {
            color++;
            flag[6] = true;
          }
          break;
        case 7:
          if (!flag[7]) {
            color++;
            flag[7] = true;
          }
          break;
        case 8:
        default:
          free++;
          break;
      }

    }
    System.out.print(Math.max(color, 1) + " ");
    System.out.println(color + free);
    sc.close();
  }
} public class Main {

  public static void main(String[] args) {

    Scanner sc = new Scanner(System.in);

    int n = Integer.parseInt(sc.next());

    int[] a = new int[n];

    for (int i = 0; i < n; i++) {
      a[i] = Integer.parseInt(sc.next()) / 400;
    }

    int color = 0;
    int free = 0;
    boolean[] flag = new boolean[8];
    for (int i = 0; i < n; i++) {
      switch (a[i]) {
        case 0:
          if (!flag[0]) {
            color++;
            flag[0] = true;
          }
          break;
        case 1:
          if (!flag[1]) {
            color++;
            flag[1] = true;
          }
          break;
        case 2:
          if (!flag[2]) {
            color++;
            flag[2] = true;
          }
          break;
        case 3:
          if (!flag[3]) {
            color++;
            flag[3] = true;
          }
          break;
        case 4:
          if (!flag[4]) {
            color++;
            flag[4] = true;
          }
          break;
        case 5:
          if (!flag[5]) {
            color++;
            flag[5] = true;
          }
          break;
        case 6:
          if (!flag[6]) {
            color++;
            flag[6] = true;
          }
          break;
        case 7:
          if (!flag[7]) {
            color++;
            flag[7] = true;
          }
          break;
        case 8:
        default:
          free++;
          break;
      }

    }
    System.out.print(Math.max(color, 1) + " ");
    System.out.println(color + free);
    sc.close();
  }
} Main
import java.util.Scanner;

public class Main {

  public static void main(String[] args) {

    Scanner sc = new Scanner(System.in);

    int n = Integer.parseInt(sc.next());

    int[] a = new int[n];

    for (int i = 0; i < n; i++) {
      a[i] = Integer.parseInt(sc.next()) / 400;
    }

    int color = 0;
    int free = 0;
    boolean[] flag = new boolean[8];
    for (int i = 0; i < n; i++) {
      switch (a[i]) {
        case 0:
          if (!flag[0]) {
            color++;
            flag[0] = true;
          }
          break;
        case 1:
          if (!flag[1]) {
            color++;
            flag[1] = true;
          }
          break;
        case 2:
          if (!flag[2]) {
            color++;
            flag[2] = true;
          }
          break;
        case 3:
          if (!flag[3]) {
            color++;
            flag[3] = true;
          }
          break;
        case 4:
          if (!flag[4]) {
            color++;
            flag[4] = true;
          }
          break;
        case 5:
          if (!flag[5]) {
            color++;
            flag[5] = true;
          }
          break;
        case 6:
          if (!flag[6]) {
            color++;
            flag[6] = true;
          }
          break;
        case 7:
          if (!flag[7]) {
            color++;
            flag[7] = true;
          }
          break;
        case 8:
        default:
          free++;
          break;
      }

    }
    System.out.print(Math.max(color, 1) + " ");
    System.out.println(color + free);
    sc.close();
  }
}