#include <bits/stdc++.h>
using namespace std;
int A[10003];
int N, M;
vector<int> t[100000];
int found;
vector<int> init(int l, int r, int node) {
  if (l == r) return t[node] = vector<int>({A[l]});
  int mid = (l + r) / 2;
  vector<int> L = init(l, mid, 2 * node);
  vector<int> R = init(mid + 1, r, 2 * node + 1);
  vector<int> ret;
  int posl = 0;
  int posr = 0;
  while (posl < L.size() && posr < R.size()) {
    if (L[posl] < R[posr])
      ret.push_back(L[posl++]);
    else
      ret.push_back(R[posr++]);
  }
  for (; posl < L.size(); posl++) ret.push_back(L[posl]);
  for (; posr < R.size(); posr++) ret.push_back(R[posr]);
  return t[node] = ret;
}
int query(int nl, int nr, int l, int r, int node, int num) {
  if (l <= nl && nr <= r) {
    if (t[node][lower_bound(t[node].begin(), t[node].end(), num) -
                t[node].begin()] == num)
      found = 1;
    return lower_bound(t[node].begin(), t[node].end(), num) - t[node].begin();
  }
  if (r < nl || nr < l) return 0;
  int nm = (nl + nr) / 2;
  return query(nl, nm, l, r, 2 * node, num) +
         query(nm + 1, nr, l, r, 2 * node + 1, num);
}
int main() {
  cin >> N >> M;
  for (int i = 0; i < N; i++) cin >> A[i];
  init(0, N - 1, 1);
  for (int i = 0; i < M; i++) {
    int l, r, x;
    cin >> l >> r >> x;
    found = 0;
    int smaller = query(0, N - 1, l - 1, r - 1, 1, A[x - 1]);
    if (!found)
      cout << "Yes\n";
    else {
      if (smaller == x - l)
        cout << "Yes\n";
      else
        cout << "No\n";
    }
  }
  return 0;
}
