2 testcases not working

testcase 0 and 1 are not working. please look into it.

@Akshita99
You code is producing incorrect results for testcases like:

2 0
0 0
Expected Output:
0
0 0