#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(false);
  cin.tie(nullptr);
  int n, m;
  cin >> n >> m;
  vector<int> a(n);
  for (int i = 0; i < int(n); i++) cin >> a[i];
  vector<int> dp(n, 0);
  int last = 0;
  int start = 0, finish = 0;
  int i = 1;
  while (i < n) {
    start = finish;
    while (a[i] >= a[i - 1]) {
      i++;
    }
    while (a[i] <= a[i - 1]) {
      if (a[i] < a[i - 1]) finish = i;
      i++;
    }
    dp[start] = i - 1;
  }
  int actual = dp[0];
  for (int i = int(1); i < int(n); i++) {
    if (dp[i] != 0)
      actual = dp[i];
    else
      dp[i] = actual;
  }
  while (m--) {
    int l, r;
    cin >> l >> r;
    l--;
    r--;
    if (r > dp[l])
      cout << "No" << '\n';
    else
      cout << "Yes" << '\n';
  }
}
