#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ld = long double;
const ll inf = 1e18;
const ll mod = 1e9 + 7;
const ll MOD = 998244353;
const ll MAX = 2e5 + 1;
inline ll add(ll a, ll b) { return ((a % mod) + (b % mod)) % mod; }
inline ll sub(ll a, ll b) { return ((a % mod) - (b % mod) + mod) % mod; }
inline ll mul(ll a, ll b) { return ((a % mod) * (b % mod)) % mod; }
ll pwr(ll x, ll n) {
  if (!n) return 1;
  if (n & 1)
    return mul(x, pwr(mul(x, x), (n - 1) / 2));
  else
    return pwr(mul(x, x), n / 2);
}
ll modinv(ll n) { return pwr(n, mod - 2); }
void speed_solve() {
  ll n, m;
  cin >> n >> m;
  ll a[n];
  for (ll i = 0; i < n; i++) {
    cin >> a[i];
  }
  ll pre[n], suf[n];
  pre[0] = 1;
  for (ll i = 1; i < n; i++) {
    pre[i] = (a[i] <= a[i - 1] ? pre[i - 1] + 1 : 1);
  }
  suf[n - 1] = 1;
  for (ll i = n - 2; i >= 0; i--) {
    suf[i] = (a[i] <= a[i + 1] ? suf[i + 1] + 1 : 1);
  }
  for (ll i = 0; i < m; i++) {
    ll l, r;
    cin >> l >> r;
    cout << (pre[r - 1] + suf[l - 1] > r - l + 1 ? "Yes" : "No") << "\n";
  }
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  ll test_cases = 1;
  for (ll i = 0; i < test_cases; i++) {
    speed_solve();
  }
  return 0;
}
