#include <bits/stdc++.h>
using namespace std;
int a[100100], u[100100], d[100100], n, m, r, l;
int main() {
  cin >> n >> m;
  for (int i = 1; i <= n; i++) cin >> a[i];
  u[1] = d[1] = 1;
  for (int i = 2; i <= n; i++) {
    if (a[i] >= a[i - 1])
      u[i] = u[i - 1];
    else
      u[i] = i;
    if (a[i] <= a[i - 1])
      d[i] = d[i - 1];
    else
      d[i] = i;
  }
  while (m--) {
    cin >> l >> r;
    r = d[r];
    r = u[r];
    if (r <= l)
      cout << "Yes\n";
    else
      cout << "No\n";
  }
}
