#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  int n, m;
  cin >> n >> m;
  vector<int> v(n), inc(n, -1), dec(n, n - 1);
  for (int i = 0; i < n; i++) {
    cin >> v[i];
    if (i > 0) {
      if (v[i] > v[i - 1])
        inc[i] = i;
      else
        inc[i] = inc[i - 1];
    }
  }
  for (int i = n - 2; i >= 0; i--) {
    if (v[i] > v[i + 1])
      dec[i] = i;
    else
      dec[i] = dec[i + 1];
  }
  for (int i = 0; i < m; i++) {
    int l, r;
    cin >> l >> r;
    l--;
    r--;
    if (dec[l] >= inc[r])
      cout << "Yes\n";
    else
      cout << "No\n";
  }
}
