import java.util.Scanner;
public class test10
{
public static void main(String[] args)
{
Scanner in = new Scanner(System.in);
int numOfOdd = 0;//奇数个数
int numOfEven = 0;//偶数个数
int num =0;
while (num != -1)
{
// Scanner in = new Scanner(System.in);
num = in.nextInt();
if(num<100000&&num>0)
{
if (num % 2 == 0)
{
numOfEven++;
}
else if (num % 2 != 0)
{
numOfOdd++;
}
}
}
System.out.println(numOfOdd + " " + numOfEven);
}
}