#B4063. Count Odd and Even Numbers

    ID: 11720 Type: Default 1000ms 256MiB

Count Odd and Even Numbers

Count Odd and Even Numbers

Given n positive integers, determine how many are odd and how many are even. A number is odd if it satisfies the congruence x1(mod2)x \equiv 1 \pmod{2}; otherwise, it is even.

inputFormat

The first line contains an integer $n$ ($1 \leq n \leq 10^5$), representing the number of integers. The second line contains $n$ positive integers separated by spaces.

outputFormat

Output two integers separated by a space: the count of odd numbers and the count of even numbers.

sample

5
1 2 3 4 5
3 2