#include <bits/stdc++.h>
using namespace std;
long long int mod = 1e9 + 7;
const long long int INF = 1e15 + 7;
long long int get(long long int x, long long int y) {
  long long int z;
  cout << "? " << x << " " << y << endl;
  cin >> z;
  return z;
}
void primes(vector<long long int>& v, long long int n) {
  vector<long long int> temp(n + 1, 1);
  temp[0] = temp[1] = 0;
  for (long long int i = 2; i * i <= n; i++) {
    if (temp[i] == 1) {
      for (long long int j = i * i; j <= n; j += i) {
        temp[j] = 0;
      }
    }
  }
  for (long long int i = 0; i <= n; i++) {
    if (temp[i] == 1) {
      v.push_back(i);
    }
  }
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  long long int i, j, k, n, t, m;
  cin >> n >> m;
  long long int a[n];
  for (i = 0; i < n; i++) {
    cin >> a[i];
  }
  vector<long long int> pre(n, 0);
  long long int flag = 1, first_index = 0;
  for (i = 0; i < n - 1; i++) {
    if (flag == 1) {
      if (a[i] > a[i + 1]) {
        flag = 0;
      }
    } else {
      if (a[i] < a[i + 1]) {
        flag = 1;
        pre[first_index] = i;
      }
    }
    if (a[i] != a[i + 1]) {
      first_index = i;
    }
  }
  pre[n - 1] = n - 1;
  for (i = n - 2; i >= 0; i--) {
    if (pre[i] == 0) {
      pre[i] = pre[i + 1];
    }
  }
  for (i = 0; i < m; i++) {
    long long int x, y;
    cin >> x >> y;
    if (pre[x - 1] >= y - 1) {
      cout << "Yes" << endl;
    } else {
      cout << "No" << endl;
    }
  }
  return 0;
}
