#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, m;
  cin >> n >> m;
  vector<long long> v(n);
  for (int i = 0; i < n; i++) {
    cin >> v[i];
  }
  vector<long long> v1(n - 1);
  for (int i = 0; i < n - 1; i++) {
    if (v[i] < v[i + 1])
      v1[i] = 1;
    else if (v[i] == v[i + 1])
      v1[i] = 0;
    else
      v1[i] = -1;
  }
  vector<long long> prefix(n - 1);
  vector<long long> suffix(n - 1);
  if (n > 2) {
    int pos = -1;
    for (int i = 0; i < n - 1; i++) {
      if (v1[i] == 1) {
        pos = i;
      }
      prefix[i] = pos;
      if (0) {
        cerr << "prefix[i]"
             << " : " << prefix[i] << " :: "
             << "i"
             << " : " << i << endl;
      };
    }
    pos = n - 1;
    for (int i = n - 2; i > -1; i--) {
      if (v1[i] == -1) {
        pos = i;
      }
      suffix[i] = pos;
      if (0) {
        cerr << "suffix[i]"
             << " : " << suffix[i] << " :: "
             << "i"
             << " : " << i << endl;
      };
    }
  }
  int l, r;
  for (int i = 0; i < m; i++) {
    cin >> l >> r;
    if (l == r || abs(l - r) == 1) {
      cout << "Yes\n";
    } else {
      if (suffix[l - 1] > prefix[r - 2])
        cout << "Yes\n";
      else
        cout << "No\n";
    }
  }
}
