Why two test case are failing?

@faangcodingblocks,
Your code fails on this I think,

Input
2
1 -1