Coding-Riddles/rhyme.py
2025-01-20 11:37:00 -05:00

11 lines
No EOL
277 B
Python

for i in range(int(input(""))):
x, y = input("").split(" ")
if x.endswith("17") or y.endswith("17"):
print("NO")
elif (x.endswith("7") and y.endswith("11")) or (x.endswith("11") and y.endswith("7")):
print("YES")
else:
print("NO")