#include <bits/stdc++.h>
using namespace std;
int beg[200000];
int ed[200000];
int a[200000];
int main() {
  int m, n, i, j, aa, b;
  scanf("%d %d", &n, &m);
  for (i = 0; i < n; i++) {
    scanf("%d", &a[i]);
  }
  ed[0] = 0;
  for (i = 1; i < n; i++) {
    if (a[i] <= a[i - 1])
      ed[i] = ed[i - 1];
    else
      ed[i] = i;
  }
  beg[n - 1] = n - 1;
  for (i = n - 2; i >= 0; i--) {
    if (a[i] <= a[i + 1])
      beg[i] = beg[i + 1];
    else
      beg[i] = i;
  }
  while (m--) {
    scanf("%d %d", &aa, &b);
    aa--;
    b--;
    if (beg[aa] >= ed[b])
      printf("Yes\n");
    else
      printf("No\n");
  }
  return 0;
}
