#include <bits/stdc++.h>
using namespace std;
struct code {
  int x, y;
};
bool comp(code a, code b) { return a.x < b.x or (a.x == b.x and a.y < b.y); }
int gcd(int a, int b) {
  while (b) {
    a %= b;
    swap(a, b);
  }
  return a;
}
const int MX = 2e5 + 10;
int a[MX], n, m, ok, temp[MX];
int cnt[MX];
map<int, int> mp;
bool check() { return 1; }
int main() {
  int n, m, L, R, x;
  cin >> n >> m;
  for (int i = 1; i <= n; i++) {
    cin >> a[i];
    temp[i] = a[i];
  }
  while (m--) {
    cin >> L >> R >> x;
    int q = a[x];
    for (int i = L; i <= R; i++) {
      cnt[a[i]]++;
    }
    for (int i = 1; i <= n; i++) {
      if (cnt[i]) a[L++] = i;
      cnt[i] = 0;
    }
    if (a[x] == q)
      cout << "Yes\n";
    else
      cout << "No\n";
    for (int i = 1; i <= n; i++) {
      a[i] = temp[i];
    }
  }
}
