#include <bits/stdc++.h>
const long long inf = 1e17 + 7;
using namespace std;
int32_t main() {
  ios_base::sync_with_stdio(false);
  cin.tie(nullptr);
  cout.tie(nullptr);
  long long n, m;
  cin >> n >> m;
  long long a[n];
  for (long long i = 0; i < n; i++) cin >> a[i];
  long long fro[n], bac[n];
  fro[0] = 0;
  for (long long i = 1; i < n; i++) {
    if (a[i] <= a[i - 1])
      fro[i] = fro[i - 1] + 1;
    else
      fro[i] = 0;
  }
  bac[n - 1] = 0;
  for (long long i = n - 2; i >= 0; i--) {
    if (a[i] <= a[i + 1])
      bac[i] = bac[i + 1] + 1;
    else
      bac[i] = 0;
  }
  for (long long i = 0; i < m; i++) {
    long long a, b;
    cin >> a >> b;
    a--;
    b--;
    if (a == b)
      cout << "Yes"
           << "\n";
    else if (fro[b] + bac[a] >= b - a)
      cout << "Yes"
           << "\n";
    else
      cout << "No"
           << "\n";
  }
  return 0;
}
