#include <bits/stdc++.h>
#pragma GCC optimize("Ofast")
using namespace std;
long long minVal(long long x, long long y) { return (x < y) ? x : y; }
long long getMid(long long s, long long e) { return s + (e - s) / 2; }
long long RMQUtil(long long *st, long long ss, long long se, long long qs,
                  long long qe, long long index) {
  if (qs <= ss && qe >= se) return st[index];
  if (se < qs || ss > qe) return INT_MAX;
  long long mid = getMid(ss, se);
  return minVal(RMQUtil(st, ss, mid, qs, qe, 2 * index + 1),
                RMQUtil(st, mid + 1, se, qs, qe, 2 * index + 2));
}
long long RMQ(long long *st, long long n, long long qs, long long qe) {
  return RMQUtil(st, 0, n - 1, qs, qe, 0);
}
long long constructSTUtil(vector<long long> arr, long long ss, long long se,
                          long long *st, long long si) {
  if (ss == se) {
    st[si] = arr[ss];
    return arr[ss];
  }
  long long mid = getMid(ss, se);
  st[si] = minVal(constructSTUtil(arr, ss, mid, st, si * 2 + 1),
                  constructSTUtil(arr, mid + 1, se, st, si * 2 + 2));
  return st[si];
}
long long *constructST(vector<long long> arr, long long n) {
  long long x = (long long)(ceil(log2(n)));
  long long max_size = 2 * (long long)pow(2, x) - 1;
  long long *st = new long long[max_size];
  constructSTUtil(arr, 0, n - 1, st, 0);
  return st;
}
struct node {
  long long c, k, x1, y1, oc, i, j;
};
struct CompareHeight {
  bool operator()(node const &p1, node const &p2) { return p1.c > p2.c; }
};
long long minimum(long long x, long long y) { return min(x, y); }
bool comp1(pair<long long, long long> p1, pair<long long, long long> p2) {
  return p1.first < p2.first;
}
bool comp2(pair<long long, long long> p1, pair<long long, long long> p2) {
  return p1.second < p2.second;
}
vector<long long> a, b;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  long long n, m;
  cin >> n >> m;
  vector<long long> x(n + 1);
  vector<long long> m1(n + 1);
  for (int i = 1; i <= n; i++) {
    cin >> x[i];
    m1[x[i]] = i;
  }
  while (m-- > 0) {
    long long l, r, x1;
    cin >> l >> r >> x1;
    long long cnt = 0;
    for (int i = 1; i < x[x1]; i++) {
      if (m1[i] >= l && m1[i] <= r) cnt++;
    }
    if (cnt == x1 - l)
      cout << "Yes" << endl;
    else
      cout << "No" << endl;
  }
}
