#include <bits/stdc++.h>
using namespace std;
void solve() {
  long long n, m;
  cin >> n >> m;
  vector<long long> v(n);
  for (long long i = 0; i < n; i++) cin >> v[i];
  vector<long long> inc(n, 0), dec(n, 0);
  for (long long i = 1; i < n; i++) {
    if (v[i] > v[i - 1]) {
      inc[i] = inc[i - 1];
      dec[i] = i;
    } else if (v[i] < v[i - 1]) {
      dec[i] = dec[i - 1];
      inc[i] = i;
    } else {
      dec[i] = dec[i - 1];
      inc[i] = inc[i - 1];
    }
  }
  for (long long k = 0; k < m; k++) {
    long long i, j;
    cin >> i >> j;
    i--;
    j--;
    if (inc[dec[j]] <= i)
      cout << "Yes\n";
    else
      cout << "No\n";
  }
}
signed main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  long long t = 1;
  while (t--) {
    solve();
  }
  return 0;
}
