#include <bits/stdc++.h>
using namespace std;
int a[100005];
int l[100005];
int r[100005];
int main() {
  int n, m;
  while (scanf("%d%d", &n, &m) != EOF) {
    for (int i = 1; i <= n; i++) scanf("%d", &a[i]);
    l[1] = 1;
    r[n] = n;
    for (int i = 2; i <= n; i++) l[i] = a[i] <= a[i - 1] ? l[i - 1] : i;
    for (int i = n - 1; i >= 1; i--) r[i] = a[i] <= a[i + 1] ? r[i + 1] : i;
    while (m--) {
      int x, y;
      scanf("%d%d", &x, &y);
      if (r[x] >= l[y])
        puts("Yes");
      else
        puts("No");
    }
  }
  return 0;
}
