#include <bits/stdc++.h>
const unsigned long long int M = 1000000007;
using namespace std;
long long power(long long x, long long y) {
  long long res = 1;
  while (y > 0) {
    if (y & 1) res = x * res;
    y = y >> 1;
    x = x * x;
  }
  return res;
}
long long power(long long x, long long y, long long mod) {
  long long res = 1;
  while (y > 0) {
    if (y & 1) res = x * res % mod;
    y = y >> 1;
    x = x * x % mod;
  }
  return res;
}
void nik() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
}
long long up[100005], down[100005];
signed main() {
  nik();
  long long n, m;
  cin >> n >> m;
  long long a[n];
  for (long long i = 0; i < n; i++) cin >> a[i];
  long long idx = -1;
  for (long long i = 0; i < n; i++) {
    up[i] = idx;
    if (i != n - 1 and a[i] < a[i + 1]) idx = i;
  }
  idx = n + 5;
  for (long long i = n - 1; i >= 0; i--) {
    down[i] = idx;
    if (i != 0 and a[i] < a[i - 1]) idx = i;
  }
  for (long long i = 0; i < m; i++) {
    long long l, r;
    cin >> l >> r;
    l--, r--;
    long long rdx = down[l];
    long long ldx = up[r];
    if (rdx > ldx)
      cout << "Yes\n";
    else
      cout << "No\n";
  }
  return 0;
}
