#include using namespace std; int main() { int N; cin >> N; int A = 0; for(int i = 0; i < N; i++) { int a; cin >> a; A += a == 4; } cout << A << " " << N - A << endl; }