#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, m;
  cin >> n >> m;
  long long arr[n + 1];
  for (int i = 1; i <= n; i++) {
    cin >> arr[i];
  }
  int up[n + 1];
  int down[n + 1];
  for (int i = 1; i <= n; i++) {
    if (i == 1) {
      up[i] = 1, down[i] = 1;
      continue;
    }
    if (arr[i] >= arr[i - 1]) {
      up[i] = up[i - 1];
    } else {
      up[i] = i;
    }
    if (arr[i] <= arr[i - 1]) {
      down[i] = down[i - 1];
    } else {
      down[i] = i;
    }
  }
  int l, r;
  while (m--) {
    cin >> l >> r;
    r = down[r];
    r = up[r];
    if (r <= l)
      cout << "Yes\n";
    else
      cout << "No\n";
  }
}
