#include <bits/stdc++.h>
using namespace std;
int a[100005], in[100005], de[100005];
int main() {
  int n, m, j, i;
  cin >> n >> m;
  for (i = j = 1; i <= n; i++) cin >> a[i];
  for (i = j = 1; i <= n; i++) {
    if (a[i] > a[i - 1]) j = i;
    in[i] = j;
  }
  de[n + 1] = 1 << 30;
  for (i = j = n; i >= 1; i--) {
    if (a[i] > a[i + 1]) j = i;
    de[i] = j;
  }
  for (i = 0; i < m; i++) {
    int a, b;
    cin >> a >> b;
    cout << (de[a] >= in[b] ? "Yes\n" : "No\n");
  }
}
