#include <bits/stdc++.h>
using namespace std;
const int MAXM = 1e5 + 5;
const int MAXN = 1e6 + 5;
const int INF = 1e7 + 9;
const int MOD = 1e9 + 9;
const int MX = 1e9;
const int X[] = {1, -1, 0, 0}, Y[] = {0, 0, 1, -1};
int a[MAXM], up[MAXM], down[MAXM];
int main() {
  int n, m;
  cin >> n >> m;
  down[1] = 1;
  for (int i = 1; i <= n; ++i) {
    cin >> a[i];
    if (i > 1) {
      if (a[i] <= a[i - 1])
        down[i] = down[i - 1];
      else
        down[i] = i;
    }
  }
  up[n] = n;
  for (int i = n - 1; i >= 1; --i) {
    if (a[i] <= a[i + 1])
      up[i] = up[i + 1];
    else
      up[i] = i;
  }
  for (int i = 1; i <= m; ++i) {
    int l, r;
    cin >> l >> r;
    if (up[l] >= down[r])
      puts("Yes");
    else
      puts("No");
  }
}
