#include <bits/stdc++.h>
int dp[100020], rdp[100020], a[100020];
int main() {
  int i, j, n, m;
  memset(a, 0, sizeof(a));
  memset(dp, 0, sizeof(dp));
  memset(rdp, 0, sizeof(rdp));
  scanf("%d %d", &n, &m);
  for (i = 1; i <= n; i++) scanf("%d", &a[i]);
  for (i = 1; i <= n; i++) {
    if (a[i] <= a[i - 1])
      dp[i] = dp[i - 1] + 1;
    else
      dp[i] = 1;
  }
  for (i = n; i >= 1; i--) {
    if (a[i] <= a[i + 1])
      rdp[i] = rdp[i + 1] + 1;
    else
      rdp[i] = 1;
  }
  int l, r;
  for (i = 1; i <= m; i++) {
    scanf("%d %d", &l, &r);
    if ((rdp[l] + dp[r]) >= (r - l + 1))
      printf("Yes\n");
    else
      printf("No\n");
  }
  return 0;
}
