tanmay_newatia

Q3

Oct 29th, 2022 (edited)
26
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.30 KB | Source Code | 0 0
  1. for _ in range(int(input())):
  2.     n=[int(x) for x in input().split()]
  3.     if n[0]==0 and n[1]==0:
  4.         print("YES")
  5.     elif (n[0]+n[1])%3==0 and n[0]!=0 and n[1]!=0:
  6.         if (max(n)/min(n))<=2:
  7.             print("YES")
  8.         else:
  9.             print("NO")
  10.     else:
  11.         print("NO")
Advertisement
Add Comment
Please, Sign In to add comment