TANDP - Editorial

t = int(input())

while t>0:

m , n = map(int , input().split())

x , y = map(int , input().split())

a , b = map(int , input().split())

Tt = n - x + m - y

Tp = max(n-a , m-b)

if Tp<Tt:

    print("NO")

else:

    print("YES")

t-=1

Can anyone tell me why am I getting WA? I am getting correct output with the given test case.

done it in python, got TLE, done it in cpp using the same logic, got AC : (