4697: P8799 [蓝桥杯 2022 国 B] 齿轮
          Memory Limit:128 MB
          Time Limit:1.000 S
         
      
      
        
          Judge Style:Text Compare
          Creator:
      
      
          Submit:0
          Solved:0
      
Description

Input

Output

Sample Input Copy
5 3
4 2 3 3 1
2
4
6Sample Output Copy
YES
YES
NOHINT
