e-olymp
favorite We need a little bit of your help to keep things running, click on this banner to learn more

172

172

Time limit 1 second
Memory limit 64 MiB
Input example #1
7
0 1 -2 1 0 0 3
Output example #1
0 1
Input example #4
5
-1 -2 0 2 1
Output example #4
NO