#include <bits/stdc++.h>
using namespace std;
template <class T>
void print_array(T a[], int size) {
  for (int i = 0; i < size; i++) cout << a[i] << " ";
  cout << endl;
}
template <class T>
void print_array_v(T &a) {
  int size = a.size();
  for (int i = 0; i < size; i++) cout << a[i] << " ";
  cout << endl;
}
int main() {
  int n, m;
  cin >> n >> m;
  int a[100100];
  int inc[100100];
  int dec[100100];
  inc[0] = dec[n - 1] = 1;
  for (int i = 0; i < n; i++) scanf("%d", &a[i]);
  for (int i = 1; i < n; i++)
    if (a[i] <= a[i - 1])
      inc[i] = inc[i - 1] + 1;
    else
      inc[i] = 1;
  for (int i = n - 2; i >= 0; i--)
    if (a[i] <= a[i + 1])
      dec[i] = dec[i + 1] + 1;
    else
      dec[i] = 1;
  for (int i = 0; i < m; i++) {
    int l, r;
    scanf("%d", &l);
    scanf("%d", &r);
    l--;
    r--;
    if (inc[r] + dec[l] >= r - l + 1)
      printf("Yes\n");
    else
      printf("No\n");
  }
  return 0;
}
