#include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 5;
int a[N];
int n, q;
struct node {
  int cnt;
  node* L;
  node* R;
  node(int _cnt = 0, node* _L = NULL, node* _R = NULL) {
    L = _L;
    R = _R;
    cnt = _cnt;
  }
  node* insert(int l, int r, int val);
};
node* null = new node();
node* node ::insert(int l, int r, int val) {
  if (l == r) {
    return new node(this->cnt + 1, NULL, NULL);
  }
  int mid = (l + r) / 2;
  if (val <= mid) {
    return new node(this->cnt + 1, this->L->insert(l, mid, val), this->R);
  }
  return new node(this->cnt + 1, this->L, this->R->insert(mid + 1, r, val));
}
int getkth(node* A, node* B, int l, int r, int k) {
  if (l == r) {
    return l;
  }
  int mid = (l + r) / 2;
  int cnt = (B->L->cnt - A->L->cnt);
  if (cnt >= k) {
    return getkth(A->L, B->L, l, mid, k);
  } else {
    return getkth(A->R, B->R, mid + 1, r, k - cnt);
  }
}
node* root[N];
map<int, int> pos;
map<int, int> rev;
int main() {
  scanf("%d", &n);
  ;
  scanf("%d", &q);
  ;
  for (int i = 1; i < n + 1; i++) {
    scanf("%d", &a[i]);
    ;
    pos[a[i]];
  }
  int cnt = 0;
  for (auto x : pos) {
    pos[x.first] = ++cnt;
    rev[cnt] = x.first;
  }
  null->L = null->R = null;
  root[0] = null;
  for (int i = 1; i < n + 1; i++) {
    root[i] = root[i - 1]->insert(1, cnt, pos[a[i]]);
  }
  while (q--) {
    int x, y, k;
    scanf("%d%d%d", &x, &y, &k);
    int temp = k;
    k = k - x + 1;
    int ans = rev[getkth(root[x - 1], root[y], 1, cnt, k)];
    if (ans == a[temp]) {
      puts("Yes");
    } else {
      puts("No");
    }
  }
}
