#include <bits/stdc++.h>
using namespace std;
const int INF = 1 << 30;
int increase[111111], decrease[111111], a[111111];
int main() {
  int n, m, l, r;
  scanf("%d %d", &n, &m);
  for (int i = 1; i <= n; i++) scanf("%d", &a[i]);
  increase[1] = 1;
  for (int i = 2; i <= n; i++) {
    if (a[i] > a[i - 1])
      increase[i] = i;
    else
      increase[i] = increase[i - 1];
  }
  decrease[n] = n;
  for (int i = n - 1; i >= 1; i--) {
    if (a[i] > a[i + 1])
      decrease[i] = i;
    else
      decrease[i] = decrease[i + 1];
  }
  while (m--) {
    scanf("%d %d", &l, &r);
    if (increase[r] > decrease[l])
      printf("No\n");
    else
      printf("Yes\n");
  }
  return 0;
}
