#include <bits/stdc++.h>
using namespace std;
long long a[5000005], b[5000005], r, m = 0, n, co;
int main() {
  ios_base::sync_with_stdio(false);
  long long t = 0, x, sum = 0, z = 0, y = 0, l = 0, i, j, k, p, q;
  scanf("%lld", &n);
  ;
  scanf("%lld", &m);
  ;
  for (i = 0; i < n; i++) {
    scanf("%lld", &x);
    ;
    a[i] = x;
  }
  j = 0;
  t = 0;
  for (i = 1; i < n; i++) {
    if (a[i] >= a[i - 1] && t == 0) {
      t = 0;
    } else if (a[i] <= a[i - 1]) {
      t = 1;
    } else if (a[i] > a[i - 1] && t == 1) {
      j = i - 1;
      while (a[j] == a[j - 1]) j--;
      t = 0;
    }
    b[i] = j;
  }
  while (m--) {
    scanf("%lld", &x);
    ;
    scanf("%lld", &y);
    ;
    x--;
    y--;
    if (b[y] <= x)
      printf("Yes\n");
    else
      printf("No\n");
  }
  return 0;
}
