#include <bits/stdc++.h>
int l[100002], a[100002], r[100002];
int main() {
  int n, m, i, x, y, j, k;
  scanf("%d%d", &n, &m);
  for (i = 1; i <= n; i++) scanf("%d", &a[i]);
  r[n] = n;
  r[0] = -1;
  for (i = n - 1; i >= 1; i--)
    if (a[i] >= a[i + 1])
      r[i] = r[i + 1];
    else
      r[i] = i;
  i = n;
  while (i) {
    j = i;
    while (r[i] == r[j]) j--;
    j++;
    for (k = j; k <= i; k++) r[k] = j;
    i = j - 1;
  }
  l[1] = 1;
  l[n + 1] = -1;
  for (i = 2; i <= n; i++)
    if (a[i] >= a[i - 1])
      l[i] = l[i - 1];
    else
      l[i] = i;
  i = 1;
  while (i <= n) {
    j = i;
    while (l[i] == l[j]) j++;
    j--;
    for (k = j; k >= i; k--) l[k] = j;
    i = j + 1;
  }
  for (i = 1; i <= m; i++) {
    scanf("%d%d", &x, &y);
    if (l[x] < r[y])
      printf("No\n");
    else
      printf("Yes\n");
  }
}
