#include <bits/stdc++.h>
using namespace std;
const int mod = 1e9 + 7;
void solve(int tc) {
  int n, m;
  cin >> n >> m;
  vector<int> v(n);
  for (auto &x : v) cin >> x;
  vector<int> inc(n), dec(n);
  inc[n - 1] = dec[n - 1] = n - 1;
  for (int i = n - 2; i >= 0; --i) {
    dec[i] = inc[i] = i;
    if (v[i] <= v[i + 1]) inc[i] = inc[i + 1];
    if (v[i] >= v[i + 1]) dec[i] = dec[i + 1];
  }
  while (m--) {
    int l, r;
    cin >> l >> r;
    --l, --r;
    if (inc[l] >= r or dec[inc[l]] >= r)
      cout << "Yes\n";
    else
      cout << "No\n";
  }
}
signed main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int tc = 1;
  for (int i = 1; i <= tc; ++i) solve(i);
  return 0;
}
