#include <bits/stdc++.h>
using namespace std;
const int maxn = 100005;
int a[maxn], f[maxn], g[maxn];
int n, m;
void init() {
  f[1] = 1;
  g[n] = n;
  for (int i = 2; i <= n; i++) {
    if (a[i] >= a[i - 1])
      f[i] = f[i - 1];
    else
      f[i] = i;
  }
  for (int i = n - 1; i > 0; i--) {
    if (a[i] >= a[i + 1])
      g[i] = g[i + 1];
    else
      g[i] = i;
  }
}
bool solve(int x, int y) {
  int l = x, r = y, mid;
  while (l + 1 < r) {
    mid = (l + r) / 2;
    if (f[mid] <= x && g[mid] >= y) return true;
    if (f[mid] > x)
      r = mid;
    else
      l = mid;
  }
  if (f[r] <= x && g[r] >= y) return true;
  if (f[l] <= x && g[l] >= y) return true;
  return false;
}
int main() {
  if (0) {
    freopen("a.inp", "r", stdin);
    freopen("a.out", "w", stdout);
  };
  scanf("%d%d", &n, &m);
  for (int i = 1; i <= n; i++) scanf("%d", &a[i]);
  init();
  int x, y;
  for (int i = 1; i <= m; i++) {
    scanf("%d%d", &x, &y);
    if (solve(x, y))
      puts("Yes");
    else
      puts("No");
  }
}
