Help me in solving DIFFSUM problem

My issue

test case are failed while take input like a,b = map(int,input().split())
and while use these method a = int(input()) b = int(input()) sample test case are fail

My code

# cook your dish here

n ,m = map(int,input().split())
n=int(input())
m=int(input())
if(n>m):
print(n-m)
else:
print(n+m)
Problem Link: DIFFSUM Problem - CodeChef

@shareef27
U have to do simply like this

# cook your dish here
a = int(input())
b = int(input())
if a > b:
    print( a - b )
else:
    print( a + b )