Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- for _ in range(int(input())):
- n=[int(x) for x in input().split()]
- if n[0]==0 and n[1]==0:
- print("YES")
- elif (n[0]+n[1])%3==0 and n[0]!=0 and n[1]!=0:
- if (max(n)/min(n))<=2:
- print("YES")
- else:
- print("NO")
- else:
- print("NO")
Advertisement
Add Comment
Please, Sign In to add comment