#include <bits/stdc++.h>
using namespace std;
const int maxn = 101000;
int n, m, cur, inc[maxn], d[maxn], a[maxn], p, b, t;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cin >> n >> m;
  for (int i = 1; i <= n; i++) cin >> a[i];
  cur = n;
  inc[n] = n;
  for (int i = n - 1; i >= 1; i--) {
    if (a[i] > a[i + 1]) cur = i;
    inc[i] = cur;
  }
  cur = n;
  d[n] = n;
  for (int i = n - 1; i >= 1; i--) {
    if (a[i] < a[i + 1]) cur = i;
    d[i] = cur;
  }
  while (m--) {
    cin >> p >> b;
    t = d[inc[p]];
    if (t >= b)
      puts("Yes");
    else
      puts("No");
  }
  return 0;
}
