Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- t = int(input())
- for _ in range(t):
- a, b, c, d, K = tuple([int(i) for i in input().split(" ")])
- dist = abs(c - a) + abs(d - b)
- if dist < K:
- if (K - dist) % 2 == 0:
- print("YES")
- else:
- print("NO")
- elif dist == K:
- print("YES")
- elif dist > K:
- print("NO")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement