#include <bits/stdc++.h>
using namespace std;
inline void INP() {}
const long long int inf = 0x3f3f3f3f;
const long long int INF = 0x3f3f3f3f3f3f3f3f;
long long int n, m, k, q;
string s;
long long int a[(long long int)2e5 + 5], uper[(long long int)2e5 + 5],
    niche[(long long int)2e5 + 5];
void go() {
  cin >> n >> m;
  for (long long int i = 1; i < n + 1; i++) cin >> a[i];
  niche[1] = 1;
  uper[n] = n;
  for (long long int i = n - 1; i >= 0; i--) {
    if (a[i] <= a[i + 1])
      uper[i] = uper[i + 1];
    else
      uper[i] = i;
  }
  for (long long int i = 2; i < n + 1; i++) {
    if (a[i] <= a[i - 1])
      niche[i] = niche[i - 1];
    else
      niche[i] = i;
  }
  while (m--) {
    long long int l, r;
    cin >> l >> r;
    if (uper[l] >= niche[r])
      cout << "Yes\n";
    else
      cout << "No\n";
  }
}
int32_t main() {
  INP();
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  ;
  long long int t = 1;
  while (t--) go();
}
