#include <iostream>
using namespace std;
int main()
{
int n, m, c1 = 0, c2 = 0;
cin >> n;
while (n--)
{
scanf("%d", &m);
if (m % 2) // 奇数
c1++;
else
c2++;
}
cout << c1 << " " << c2;
return 0;
}