#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  long long int n, m;
  cin >> n >> m;
  long long int a[n], l[n], r[n];
  for (long long int i = 0; i < n; ++i) {
    cin >> a[i];
    l[i] = i;
    r[i] = i;
  }
  for (long long int i = 0; i < n - 1; ++i)
    if (a[i] >= a[i + 1]) l[i + 1] = l[i];
  for (long long int i = n - 1; i > 0; --i)
    if (a[i] >= a[i - 1]) r[i - 1] = r[i];
  while (m--) {
    long long int x, y;
    cin >> x >> y;
    if (r[x - 1] >= l[y - 1])
      cout << "Yes\n";
    else
      cout << "No\n";
  }
  return 0;
}
