#include <bits/stdc++.h>
using namespace std;
const int maxn = 1e5 + 123, inf = (int)1e9 + 7;
int n, m, a[maxn], pref1[maxn], pref2[maxn];
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  cin >> n >> m;
  for (int i = 1; i <= n; i++) cin >> a[i];
  for (int i = 2; i < n; i++) {
    pref1[i] = pref1[i - 1];
    pref2[i] = pref2[i - 1];
    if (a[i] > a[i - 1] && a[i] > a[i + 1]) pref1[i]++;
    if (a[i] < a[i - 1] && a[i] < a[i + 1]) pref2[i]++;
  }
  for (int i = 0; i < m; i++) {
    int l, r;
    cin >> l >> r;
    if (l == r) {
      cout << "Yes\n";
      continue;
    }
    if (pref2[r - 1] - pref2[l] >= 1)
      cout << "No\n";
    else if (pref1[r - 1] - pref1[l] >= 2)
      cout << "No\n";
    else if (r - l >= 2 && pref1[r - 1] - pref1[l] == 1 &&
             (a[l] > a[l + 1] || a[r] > a[r - 1]))
      cout << "No\n";
    else
      cout << "Yes\n";
  }
  return 0;
}
