#include <bits/stdc++.h>
using namespace std;
const long long sz = 100005, mod = 1000000007;
long long noq, q, n, m, i, j, k, cnt = 0, sum = 0, msum = 0, temp;
long long a[sz];
string s, t;
void solve() {
  vector<pair<long long, long long> > v;
  cin >> n >> m;
  for (long long i = 1; i <= n; i++) cin >> a[i];
  i = 0;
  while (i <= n) {
    long long si, sj;
    i++;
    si = i;
    while (i <= n and a[i + 1] >= a[i]) i++;
    i++;
    while (i <= n and a[i + 1] <= a[i]) i++;
    sj = i;
    v.push_back({si, sj});
    if (i > n) break;
    while (a[i - 1] <= a[i]) i--;
    i--;
  }
  while (m-- > 0) {
    long long l, r;
    cin >> l >> r;
    long long pos =
        lower_bound(v.begin(), v.end(), make_pair(l, LONG_LONG_MIN)) -
        v.begin();
    if (l == r || r == l + 1)
      cout << "Yes"
           << "\n";
    else if (pos == v.size()) {
      pos--;
      if (v[pos].first <= l and r <= v[pos].second)
        cout << "Yes"
             << "\n";
      else
        cout << "No"
             << "\n";
    } else if (v[pos].first == l) {
      if (r <= v[pos].second)
        cout << "Yes"
             << "\n";
      else
        cout << "No"
             << "\n";
    } else if (pos == 0)
      cout << "No"
           << "\n";
    else {
      pos--;
      if (v[pos].first <= l and r <= v[pos].second)
        cout << "Yes"
             << "\n";
      else
        cout << "No"
             << "\n";
    }
  }
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  ;
  noq = 1;
  while (noq-- > 0) solve();
  return 0;
}
