#include <bits/stdc++.h>
using namespace std;
int main() {
  long long int n, m, i;
  cin >> n >> m;
  vector<long long int> v(n + 1), a(n + 1);
  for (i = 1; i <= n; i++) {
    cin >> v[i];
  }
  long long int l = 1, r = 2, x = 0;
  while (r <= n) {
    if (x == 0) {
      if (v[r] >= v[r - 1]) {
        r++;
      } else {
        x = 1;
        r++;
      }
    } else {
      if (v[r] <= v[r - 1]) {
        r++;
      } else {
        for (i = l; i <= r - 1; i++) a[i] = r - 1;
        l = r - 1;
        while (l > 1 && v[l] == v[l - 1]) l--;
        r++;
        x = 0;
      }
    }
  }
  for (i = l; i <= n; i++) a[i] = n;
  while (m--) {
    long long int x, y;
    cin >> x >> y;
    if (a[x] >= y || x == y)
      cout << "Yes\n";
    else
      cout << "No\n";
  }
}
