newton/solutions/to_my_critics.py

17 lines
318 B
Python
Raw Normal View History

2025-01-11 13:45:33 +00:00
from itertools import permutations
t = int(input())
for _ in range(t):
nums = [int(c) for c in input().split(' ')]
greater = False
for i in permutations(nums, 2):
if sum(i) >= 10:
print("YES")
greater = True
break
if not greater:
print("NO")