#include int main(void){ int N; int a[50]; int kame = 0; int turu = 0; scanf("%d",&N); for(int i = 0; i < N; i++){ scanf("%d",&a[i]); if(a[i] == 4){ turu++; }else if(a[i] == 2){ kame++; } } printf("%d %d\n",turu,kame); return 0; }