use std::io::Read; fn main() { let mut s = String::new(); std::io::stdin().read_to_string(&mut s).ok(); let mut a = s.split_whitespace().flat_map(str::parse::); let mut n = a.next().unwrap(); let (mut f, mut m) = (0u16, 0u16); for a in a { f += a; if a % 4 == 0 { m += 1 } } match (f / (n - 1) / 2) % 2 { 0 => n -= m, _ => (n, m) = (m, n - m), } println!("{} {}", n, m); }