#include <bits/stdc++.h>
using namespace std;
const int N = 5000 + 20;
const int maxn = 1e5 + 20;
const int mod = 998244353;
int cnt, head[maxn], pos[maxn];
long long ksm(long long a, long long b) {
  long long res = 1;
  while (b) {
    if (b & 1) res = (res * a) % mod;
    b >>= 1, a = a * a % mod;
  }
  return res % mod;
}
void read(int &v) {
  int k = 1;
  v = 0;
  int c = getchar();
  while (c < '0' || c > '9') {
    if (c == '-') k = 0;
    c = getchar();
  }
  while (c >= '0' && c <= '9')
    v = (v << 3) + (v << 1) + (c - 48), c = getchar();
  if (k == 0) v = -v;
}
int a[100010], L[100010], R[100010];
int main() {
  int n, m;
  scanf("%d %d", &n, &m);
  for (int i = 1; i <= n; i++) scanf("%d", &a[i]), L[i] = R[i] = 1;
  for (int i = 2; i <= n; i++)
    if (a[i] <= a[i - 1]) L[i] = L[i - 1] + 1;
  for (int i = n - 1; i >= 1; i--)
    if (a[i] <= a[i + 1]) R[i] = R[i + 1] + 1;
  while (m--) {
    int l, r;
    scanf("%d%d", &l, &r);
    if (R[l] + L[r] >= r - l + 2)
      printf("Yes\n");
    else
      printf("No\n");
  }
  return 0;
}
