#include using namespace std; int main() { int N, sum = 0, t = 0, k = 0; cin >> N; vector A(N); for (int i = 0, a; cin >> a; i++) sum += A.at(i) = a; for (int i = 0; i < N; i++) (sum - A.at(i) == 2) ? k++ : t++; cout << t << " " << k << "\n"; }