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