#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, m, a[100005], l[100005], r[100005];
  cin >> n >> m;
  for (int i = 1; i <= n; i++) {
    cin >> a[i];
    l[i] = i;
    r[i] = i;
  }
  int i = 1, j = 1;
  while (i <= n) {
    while ((j < n) && (a[j] <= a[j + 1])) j++;
    r[i++] = j;
    if (i > j) j = i;
  }
  i = n;
  j = n;
  while (i >= 0) {
    while ((j > 0) && (a[j] <= a[j - 1])) j--;
    l[i--] = j;
    if (i < j) j = i;
  }
  int xl, xr;
  while (m--) {
    cin >> xl >> xr;
    if (r[xl] >= l[xr])
      cout << "Yes" << endl;
    else
      cout << "No" << endl;
  }
  return 0;
}
