#include <bits/stdc++.h>
using namespace std;
const long long N = 1e5 + 5;
long long n, m;
long long a[N], lastinc[N], lastdec[N];
int32_t main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  ;
  cin >> n >> m;
  for (long long i = 1; i <= n; i++) cin >> a[i];
  lastinc[n] = n, lastdec[n] = n;
  for (long long i = n - 1; i >= 1; i--) {
    if (a[i] <= a[i + 1])
      lastinc[i] = lastinc[i + 1];
    else
      lastinc[i] = i;
    if (a[i] >= a[i + 1])
      lastdec[i] = lastdec[i + 1];
    else
      lastdec[i] = i;
  }
  while (m--) {
    long long l, r;
    cin >> l >> r;
    if (lastdec[lastinc[l]] >= r)
      cout << "Yes"
           << "\n";
    else
      cout << "No"
           << "\n";
  }
  return 0;
}
