#include <bits/stdc++.h>
using namespace std;
const int N = 2e5 + 2;
int a[N], l[N], r[N], n;
int main() {
  ios::sync_with_stdio(false);
  int m, le, ri;
  cin >> n >> m;
  for (int i = 1; i <= n; ++i) {
    cin >> a[i];
    if (i > 1) {
      if (a[i] <= a[i - 1])
        l[i] = l[i - 1];
      else
        l[i] = i;
    }
  }
  r[n] = n;
  for (int i = n - 1; i; --i) {
    if (a[i] <= a[i + 1])
      r[i] = r[i + 1];
    else
      r[i] = i;
  }
  while (m--) {
    cin >> le >> ri;
    if (l[ri] <= r[le])
      cout << "Yes" << endl;
    else
      cout << "No" << endl;
  }
  return 0;
}
