#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> a(n);
  for (int i = 0; i < n; ++i) {
    cin >> a[i];
  }
  vector<int> rightInc(n), leftInc(n);
  int end = 0, cur_count = 1;
  for (int i = 0; i < n; ++i) {
    if (end < i) {
      end = i, cur_count = 1;
    }
    while (end + 1 < n && a[end + 1] >= a[end]) {
      end++, cur_count++;
    }
    rightInc[i] = end - i + 1, cur_count--;
  }
  reverse(a.begin(), a.end());
  end = 0, cur_count = 1;
  for (int i = 0; i < n; ++i) {
    if (end < i) {
      end = i, cur_count = 1;
    }
    while (end + 1 < n && a[end + 1] >= a[end]) {
      end++, cur_count++;
    }
    leftInc[i] = end - i + 1, cur_count--;
  }
  reverse(leftInc.begin(), leftInc.end());
  while (m--) {
    int l, r;
    cin >> l >> r;
    --l, --r;
    if (rightInc[l] + leftInc[r] >= r - l + 1)
      cout << "Yes\n";
    else
      cout << "No\n";
  }
  return 0;
}
