#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(NULL);
  cout.tie(NULL);
  ;
  long long int n, q, temp = 0, x, y;
  cin >> n >> q;
  long long int a[n], h[n], l[n];
  for (long long int i = 0; i < n; i++) cin >> a[i];
  l[0] = 0, h[n - 1] = n - 1;
  for (long long int i = 1; i < n; i++) {
    if (a[i] <= a[i - 1])
      l[i] = temp;
    else {
      l[i] = i;
      temp = i;
    }
  }
  temp = n - 1;
  for (long long int i = n - 2; i >= 0; i--) {
    if (a[i] <= a[i + 1])
      h[i] = temp;
    else {
      h[i] = i;
      temp = i;
    }
  }
  while (q--) {
    cin >> x >> y;
    if (h[x - 1] == h[y - 1] || l[x - 1] == l[y - 1] ||
        abs(h[x - 1] - l[y - 1]) < 2)
      cout << "Yes\n";
    else
      cout << "No\n";
  }
}
