Problem4169--CCC'20 J5S2- EscapeRoom

4169: CCC'20 J5S2- EscapeRoom

Time Limit: 2 Sec  Memory Limit: 512 MB
Submit: 12  Solved: 1
[Submit] [Status] [Web Board] [Creator:]

Description

Input

Output

Output yes if it is possible to escape from the room. Otherwise, output no.

Sample Input Copy

3
4
3 10 8 14
1 11 12 12
6 2 3 9

Sample Output Copy

yes

HINT

Source/Category

CCC