405588: GYM102006 A Hello SCPC 2018!
Description
Here are some facts about the problem set of this contest:
- It consists of 12 problems written in English.
- The first 4 problems are the easiest according to their estimated difficulty.
- The first 4 problems are sorted in increasing order of their estimated difficulty.
- You should probably pause now and tell your teammates, especially the one who's reading problem K.
- The other 8 problems are harder than the first four, and they are ordered randomly.
- Our estimations for the difficulty of the problems may not apply to all contestants. So make sure to read all the problems and find the ones that are the most suitable for you and your team.
You are given the difficulties of 12 problems of some contest in their exact order in the problem set, from A to L. Determine whether they are ordered in the same way we ordered this problem set or not.
InputThe first line of input contains a single integer T (1 ≤ T ≤ 4096), the number of test cases.
Each of the following T lines represents one test case, and contains 12 distinct space-separated integers d1, d2, ..., d12 (1 ≤ di ≤ 100), where di is the estimated difficulty of the ith problem. A smaller di value represents an easier problem.
No two problems have the same estimated difficulty.
OutputFor each test case, print a single line with "yes" if the given problems are ordered in the same way as in this contest, otherwise print "no".
ExampleInput3Output
1 2 4 8 32 16 35 99 78 50 64 85
1 2 3 4 5 6 7 8 9 10 11 12
4 3 2 1 5 6 7 8 9 10 11 12
yes
yes
no