#include <bits/stdc++.h> using namespace std; int main(){int n,x,o=0,e=0;cin>>n;while(n--){cin>>x;(x%2?o:e)++;}cout<<o<<" "<<e<<"\n";}