Same Snake WA

Problem code: https://www.codechef.com/problems/SAMESNAK/

Solution: https://www.codechef.com/viewsolution/14248132

My solution is pretty much editorial solution, could someone please tell me what mistake I have made?

Input:

2
4 4 4 4
10 4 1 4
10 4 1 4
4 4 4 4

Your output:

no
no

Correct output:

yes
yes

You should look for similar posts for same problem before asking.

This test case was taken from @vijju123, Read here

you should make a separate case in your code for point cases.

Ah, it didn’t cross my mind, thank you

//