#include <bits/stdc++.h>
using namespace std;
string to_string(string s) { return '"' + s + '"'; }
string to_string(char s) { return string(1, s); }
string to_string(const char* s) { return to_string((string)s); }
string to_string(bool b) { return (b ? "true" : "false"); }
template <typename A>
string to_string(A);
template <typename A, typename B>
string to_string(pair<A, B> p) {
  return "(" + to_string(p.first) + ", " + to_string(p.second) + ")";
}
template <typename A>
string to_string(A v) {
  bool f = 1;
  string r = "{";
  for (const auto& x : v) {
    if (!f) r += ", ";
    f = 0;
    r += to_string(x);
  }
  return r + "}";
}
void debug_out() { cout << '\n'; }
template <typename Head, typename... Tail>
void debug_out(Head H, Tail... T) {
  cout << " " << to_string(H);
  debug_out(T...);
}
const long long MOD = 1000000007;
long long binpow(long long b, long long p) {
  long long ans = 1;
  while (p > 0) {
    if (p & 1) ans = (ans * b) % MOD;
    b = (b * b) % MOD;
    p >>= 1;
  }
  return ans;
}
long long modinv(long long x) { return binpow(x, MOD - 2); }
signed main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  int n, m, i, l, r;
  cin >> n >> m;
  vector<int> a(n), inc(n), dec(n);
  for (i = 0; i < n; i++) {
    cin >> a[i];
    inc[i] = dec[i] = i;
  }
  for (i = n - 2; i >= 0; i--) {
    if (a[i] <= a[i + 1]) inc[i] = inc[i + 1];
    if (a[i] >= a[i + 1]) dec[i] = dec[i + 1];
  }
  while (m--) {
    cin >> l >> r;
    l--;
    r--;
    if (dec[inc[l]] >= r)
      cout << "Yes\n";
    else
      cout << "No\n";
  }
}
