#include <bits/stdc++.h>
using namespace std;
inline int IN() {
  int x = 0, f = 1;
  char ch;
  for (ch = (getchar()); ch > '9' || ch < '0'; ch = (getchar()))
    if (ch == '-') f = -1;
  for (; ch >= '0' && ch <= '9'; ch = (getchar())) (x *= 10) += ch - '0';
  return x * f;
}
int i, j, k, l, n, m, x, y, z, a[10005], t;
int main() {
  n = IN();
  m = IN();
  for (i = 1; i <= n; i++) a[i] = IN();
  for (i = 1; i <= m; i++) {
    x = IN();
    y = IN();
    z = IN();
    t = 0;
    for (j = x; j <= y; j++)
      if (a[j] < a[z]) t++;
    if (x + t == z)
      puts("Yes");
    else
      puts("No");
  }
}
