#include <bits/stdc++.h>
using namespace std;
long long a[100009];
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  long long n, q, x, y, i = 1, l, r;
  cin >> n >> q;
  while (i <= n) cin >> a[i++];
  i = 1;
  set<long long> s, d;
  while (i <= n) {
    if (a[i] > a[i - 1]) {
      while (i <= n && a[i] >= a[i - 1]) i++;
      s.insert(i - 1);
    } else if (a[i] < a[i - 1]) {
      while (i <= n && a[i] <= a[i - 1]) i++;
      d.insert(i - 1);
    } else
      i++;
  }
  s.insert(LLONG_MAX);
  d.insert(LLONG_MAX);
  while (q--) {
    cin >> l >> r;
    if (l == r) {
      cout << "Yes\n";
      continue;
    }
    x = *s.lower_bound(l);
    y = *d.lower_bound(l);
    if (x == l) {
      if (y >= r)
        cout << "Yes\n";
      else
        cout << "No\n";
      continue;
    }
    if (y == l) {
      if (x >= r)
        cout << "Yes\n";
      else {
        auto it = d.lower_bound(l);
        it++;
        y = *it;
        if (y >= r)
          cout << "Yes\n";
        else
          cout << "No\n";
      }
      continue;
    }
    if (x < y) {
      if (y >= r)
        cout << "Yes\n";
      else
        cout << "No\n";
      continue;
    }
    if (y >= r) {
      cout << "Yes\n";
      continue;
    }
    if (a[y] == a[l]) {
      auto it = d.lower_bound(l);
      it++;
      if (*it >= r)
        cout << "Yes\n";
      else
        cout << "No\n";
    } else
      cout << "No\n";
  }
}
