#include <bits/stdc++.h>
using namespace std;
int a[100005];
int dp[2][100005];
int main() {
  cin.sync_with_stdio(false);
  cout.sync_with_stdio(false);
  int n, m;
  cin >> n >> m;
  for (int i = 0; i < n; i++) cin >> a[i];
  dp[0][n - 1] = 1;
  for (int i = n - 2; i >= 0; i--) {
    if (a[i] <= a[i + 1])
      dp[0][i] = dp[0][i + 1] + 1;
    else
      dp[0][i] = 1;
  }
  dp[1][0] = 1;
  for (int i = 1; i < n; i++) {
    if (a[i] <= a[i - 1])
      dp[1][i] = dp[1][i - 1] + 1;
    else
      dp[1][i] = 1;
  }
  while (m--) {
    int x, y;
    cin >> x >> y;
    x--;
    y--;
    if (dp[0][x] + x - 1 >= y) {
      cout << "Yes" << endl;
    } else {
      if (y - dp[1][y] + 1 <= x + dp[0][x] - 1)
        cout << "Yes" << endl;
      else
        cout << "No" << endl;
    }
  }
  return 0;
}
