#include <bits/stdc++.h>
using namespace std;
long long n, bn[100009], m, bp[100009], a[100009];
int main() {
  cin >> n >> m;
  for (int i = 0; i <= n; i++) {
    bp[i] = i;
    bn[i] = i;
  }
  for (int i = 0; i < n; i++) cin >> a[i];
  for (int i = n - 2; i >= 0; i--)
    if (a[i] <= a[i + 1]) bp[i] = bp[i + 1];
  for (int i = 1; i < n; i++)
    if (a[i] <= a[i - 1]) bn[i] = bn[i - 1];
  for (int i = 0; i < m; i++) {
    long long l, r;
    cin >> l >> r;
    if (bp[l - 1] >= bn[r - 1])
      cout << "Yes";
    else
      cout << "No";
    cout << endl;
  }
  return 0;
}
