Dominance Radius
You are given an array of integers .
For each position with , define its dominance radius as the largest integer such that all of the following hold:
- ,
- for every index with and , the strict inequality holds.
You are given independent queries. Each query provides an index and a non-negative integer . For each query, determine whether .
Input
The input consists of exactly lines.
- Line 1: two integers and separated by a single space, where and .
Output
Output exactly lines. For each query in input order:
- Print the string "Yes" if .
- Otherwise, print the string "No". Each line must contain exactly one of these words with the exact capitalization and no extra spaces.
Samples
Sample 1
Input
5 4 3 1 4 1 5 3 1 3 2 1 0 5 1
Output
Yes No Yes No
For and : the query asks whether is strictly greater than all values in except at , which is true, so the first line is "Yes". The other lines correspond to the remaining queries in order.