#include <bits/stdc++.h>
using namespace std;
int a[150101];
int rak1[150101];
int rak2[150101];
int sz;
int b_s(int p1, int p2) {
  int lo = 0, hi = sz - 1, mid, x, y;
  while (lo <= hi) {
    mid = lo + (hi - lo) / 2;
    x = rak1[mid];
    y = rak2[mid];
    if (p1 >= x && p2 <= y) {
      return 1;
    } else if (p1 <= x) {
      hi = mid - 1;
    } else {
      lo = mid + 1;
    }
  }
  return 0;
}
int main() {
  long long n, q, t, k, i, p1, p2, j, s1, w,
      c = 0, c1 = 0, p, f, rs = 0, pai = 1, total, m, s = 0, c2 = 0, x, y, q1,
      q2;
  string st;
  cin >> n >> m;
  for (i = 1; i <= n; i++) {
    cin >> a[i];
  }
  for (i = 1; i <= n; i++) {
    p = i;
    while (a[p - 1] == a[p] && p - 1 > 0) {
      p--;
    }
    p1 = p;
    f = 0;
    while (a[i + 1] >= a[i] && i + 1 <= n) {
      f = 1;
      i++;
    }
    while (a[i + 1] <= a[i] && i + 1 <= n) {
      f = 1;
      i++;
    }
    p2 = i;
    rak1[c1] = p1;
    rak2[c1++] = p2;
    if (f == 1) i--;
  }
  sz = c1;
  for (i = 0; i < m; i++) {
    cin >> x >> y;
    if (b_s(x, y) == 1) {
      cout << "Yes" << endl;
    } else {
      cout << "No" << endl;
    }
  }
  return 0;
}
