#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(nullptr);
  int n, m;
  cin >> n >> m;
  vector<int> v(n);
  for (int i = 0; i < n; i += 1) cin >> v[i];
  vector<int> temp;
  for (int i = 1; i < n - 1; i += 1) {
    if (v[i] < v[i - 1] && v[i] < v[i + 1]) temp.emplace_back(i);
  }
  vector<int> inc(n), dec(n);
  int id = 1;
  for (int i = 0; i < n; i += 1) {
    id = max(i + 1, id);
    while (id < n) {
      if (v[id] >= v[id - 1])
        ++id;
      else {
        inc[i] = id - 1;
        break;
      }
    }
    if (id == n) inc[i] = id - 1;
  }
  id = 1;
  for (int i = 0; i < n; i += 1) {
    id = max(i + 1, id);
    while (id < n) {
      if (v[id] <= v[id - 1])
        ++id;
      else {
        dec[i] = id - 1;
        break;
      }
    }
    if (id == n) dec[i] = id - 1;
  }
  while (m--) {
    int l, r;
    cin >> l >> r;
    l--, r--;
    if (dec[l] >= r || inc[l] >= r || dec[inc[l]] >= r)
      cout << "Yes\n";
    else
      cout << "No\n";
  }
}
