Help for CHEF and Football Match

Hi community!
I am stuck please help me to understand why i am getting WA. Am i leaving any test case?
my solution

Check out this test case:

1
6
2 1 1
2 1 3
2 2 5
2 4 6
2 8 8
2 8 10
Correct output :
YES
NO
NO
NO
YES
NO
1 Like