#include <bits/stdc++.h>
using namespace std;
int a[100010], in[100010], de[100010];
int main() {
  int n, m;
  scanf("%d%d", &n, &m);
  for (int i = 0; i < n; i++) scanf("%d", &a[i]);
  n--;
  in[n] = de[n] = 1;
  while (n--) {
    in[n] = de[n] = 1;
    if (a[n] >= a[n + 1]) de[n] += de[n + 1];
    if (a[n] <= a[n + 1]) in[n] += in[n + 1];
  }
  while (m--) {
    int l, r;
    scanf("%d%d", &l, &r);
    l--;
    r--;
    l += in[l];
    if (l <= r) l += de[l];
    puts(l <= r ? "No" : "Yes");
  }
}
