gets a=gets.split.map(&:to_i) puts "%d %d"%[a.count(4),a.count(2)]