#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  int no_of_input, no_of_query;
  cin >> no_of_input >> no_of_query;
  int input1, input2;
  vector<int> vect1;
  vector<int> asc(no_of_input, 0);
  vector<int> dsc(no_of_input, 0);
  for (int i = 0; i < no_of_input; i++) {
    cin >> input1;
    vect1.push_back(input1);
  }
  for (int i = 0; i < no_of_input; i++) {
    asc[i] = i;
    dsc[i] = i;
  }
  for (int i = 1; i <= no_of_input; i++) {
    if (vect1[i] >= vect1[i - 1]) {
      asc[i] = asc[i - 1];
    }
    if (vect1[i] <= vect1[i - 1]) {
      dsc[i] = dsc[i - 1];
    }
  }
  for (int i = 0; i < no_of_query; i++) {
    cin >> input1 >> input2;
    input1--;
    input2--;
    int temp1 = dsc[input2];
    if (asc[temp1] <= input1) {
      cout << "Yes\n";
    } else {
      cout << "No\n";
    }
  }
}
