ABC 163 E - Active Infants
https://atcoder.jp/contests/abc163/tasks/abc163_e