#include <bits/stdc++.h>
using namespace std;
int m, n;
int T[1000001];
int L[1000001];
void read() {
  scanf("%d%d", &n, &m);
  for (int i = 0; i < n; i++) scanf("%d", &T[i]);
}
void dp() {
  L[n - 1] = n - 1;
  int it = n - 2;
  int itL = n - 1;
  int ld = n - 1;
  while (it >= 0 && T[it] <= T[it + 1]) {
    while (it >= 0 && T[it] < T[it + 1]) {
      ld = it;
      L[it] = itL;
      it--;
    }
    while (it >= 0 && T[it] == T[it + 1]) {
      L[it] = itL;
      it--;
    }
  }
  itL = ld;
  while (it >= 0) {
    while (it >= 0 && T[it] >= T[it + 1]) {
      while (it >= 0 && T[it] > T[it + 1]) {
        L[it] = itL;
        it--;
      }
      while (it >= 0 && T[it] == T[it + 1]) {
        L[it] = itL;
        it--;
      }
    }
    while (it >= 0 && T[it] <= T[it + 1]) {
      while (it >= 0 && T[it] < T[it + 1]) {
        ld = it;
        L[it] = itL;
        it--;
      }
      while (it >= 0 && T[it] == T[it + 1]) {
        L[it] = itL;
        it--;
      }
    }
    itL = ld;
  }
}
void answer() {
  for (int i = 0; i < m; i++) {
    int a, b;
    scanf("%d%d", &a, &b);
    if (L[a - 1] >= b - 1)
      printf("Yes\n");
    else
      printf("No\n");
  }
}
int main() {
  read();
  dp();
  answer();
  return 0;
}
