#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, m;
  cin >> n >> m;
  vector<int> a(n);
  for (int i = 0; i < n; i++) cin >> a[i];
  vector<int> du(n);
  for (int i = 0; i < n; i++) {
    if (i == 0 || du[i - 1] == 1) {
      int it = i;
      while (it + 1 < n && a[it] <= a[it + 1]) it += 1;
      du[i] = it - i + 1;
    } else
      du[i] = du[i - 1] - 1;
  }
  vector<int> dd(n);
  for (int i = 0; i < n; i++) {
    if (i == 0 || dd[i - 1] == 1) {
      int it = i;
      while (it + 1 < n && a[it] >= a[it + 1]) it += 1;
      dd[i] = it - i + 1;
    } else
      dd[i] = dd[i - 1] - 1;
  }
  while (m--) {
    bool b = false;
    int l, r;
    cin >> l >> r;
    l -= 1;
    r -= 1;
    if (r <= l + du[l] - 1)
      b = true;
    else {
      l = l + du[l];
      if (l >= n || r <= l + dd[l] - 1) b = true;
    }
    cout << (b ? "Yes" : "No") << '\n';
  }
}
