#include <bits/stdc++.h>
int num[100010], qian[100010], hou[100010];
int main() {
  int i, j;
  int n, m;
  scanf("%d%d", &n, &m);
  for (i = 0; i < n; i++) scanf("%d", &num[i]);
  qian[0] = 0;
  for (i = 1; i < n; i++) {
    if (num[i] > num[i - 1])
      qian[i] = i;
    else
      qian[i] = qian[i - 1];
  }
  hou[n - 1] = n - 1;
  for (i = n - 2; i >= 0; i--) {
    if (num[i] > num[i + 1])
      hou[i] = i;
    else
      hou[i] = hou[i + 1];
  }
  for (i = 0; i < m; i++) {
    int a, b;
    scanf("%d%d", &a, &b);
    if (qian[b - 1] <= hou[a - 1])
      puts("Yes");
    else
      puts("No");
  }
  return 0;
}
