import java.util.Scanner; public class Tsurukame { public static void main(String args[]){ Scanner stdIn = new Scanner(System.in); int num = stdIn.nextInt(); //匹数 int tsuru = 0; //鶴 int kame = 0; //亀 final int tlegs = 2; final int klegs = 4; for(int i = 0; i < num; i++){ int legs = stdIn.nextInt(); //足の本数(2or4) if(legs / (num - 1) == tlegs){ tsuru++; } else if(legs / (num - 1) == klegs){ kame++; } } System.out.println(tsuru + " " + kame); } }