#include using namespace std; int main() { int n; cin>>n; int legs,cnt1=0,cnt2=0; while(n--) { cin>>legs; if(legs==4 || legs%4==0) { cnt1++; } else if(legs==2 || legs%2==0) { cnt2++; } else {continue;} } printf("%d %d\n", cnt1, cnt2); return 0; }