#include <bits/stdc++.h>
using namespace std;
int i, j, k;
struct query {
  int l, r, x;
};
void sort(int *a, int n) {
  int maxi = 0;
  for (int l = 0; l < n; ++l) maxi = max(maxi, a[l]);
  int freq[maxi + 1];
  fill(freq, freq + maxi + 1, 0);
  for (int l = 0; l < n; ++l) ++freq[a[l]];
  int in = 0;
  for (int m = 0; m < maxi + 1; ++m) {
    while (freq[m]--) a[in++] = m;
  }
}
int main() {
  int n, m;
  cin >> n >> m;
  int a[n];
  for (i = 0; i < n; ++i) cin >> a[i];
  query mom;
  int *tmp;
  for (i = 0; i < m; ++i) {
    cin >> mom.l >> mom.r >> mom.x;
    tmp = new int[mom.r - mom.l + 1];
    k = 0;
    for (j = mom.l - 1; j < mom.r; ++j) tmp[k++] = a[j];
    sort(tmp, (mom.r - mom.l + 1));
    if (tmp[mom.x - mom.l] == a[mom.x - 1])
      cout << "Yes\n";
    else
      cout << "No\n";
    delete tmp;
  }
}
