#include <bits/stdc++.h>
using namespace std;
int a[100010], l[100010], r[100010];
int main() {
  int n, m;
  cin >> n >> m;
  for (int i = 1; i <= n; i++) {
    cin >> a[i];
  }
  for (int i = 1; i <= n; i++)
    if (a[i] <= a[i - 1])
      l[i] = l[i - 1];
    else
      l[i] = i;
  for (int i = n; i > 0; i--)
    if (a[i] <= a[i + 1])
      r[i] = r[i + 1];
    else
      r[i] = i;
  for (int i = 0; i < m; i++) {
    int x, y;
    cin >> x >> y;
    bool flag = false;
    if (r[x] >= y || l[y] <= x)
      flag = true;
    else if (r[x] >= l[y])
      flag = true;
    if (flag)
      cout << "Yes\n";
    else
      cout << "No\n";
  }
  return 0;
}
