#include <bits/stdc++.h>
using namespace std;
int x, y, p1, p2 = 1, k, n, m, a[100009], ans[100009], c = 1, mark[100009];
int main() {
  cin >> n >> m;
  for (int i = 0; i < n; i++) cin >> a[i];
  while (p2 < n - 1) {
    if (a[p2 + 1] > a[p2] && k == 0) p2++;
    if (a[p2 + 1] > a[p2] && k == 1) {
      ans[p1] = c;
      mark[p2] = 1;
      c++;
      p2++;
      p1 = p2;
      k = 0;
    }
    if (a[p2 + 1] < a[p2] && k == 1) p2++;
    if (a[p2 + 1] < a[p2] && k == 0) {
      k = 1;
      p2++;
    }
    if (a[p2 + 1] == a[p2]) p2++;
  }
  ans[p1] = c;
  for (int i = 1; i < n; i++) {
    if (ans[i] == 0) ans[i] = ans[i - 1];
  }
  for (int i = n - 2; i >= 0; i--) {
    if (mark[i + 1] == 1 && a[i] == a[i + 1]) mark[i] = 1;
  }
  cout << endl;
  for (int i = 0; i < m; i++) {
    cin >> x >> y;
    x--;
    y--;
    if (ans[x] == ans[y] || (mark[x] == 1 && ans[y] == ans[x] + 1))
      cout << "Yes" << endl;
    else
      cout << "No" << endl;
  }
}
