#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, m;
  cin >> n >> m;
  int arr[n + 1];
  for (int i = 1; i <= n; i++) cin >> arr[i];
  while (m--) {
    int l, r, x;
    cin >> l >> r >> x;
    int ct = 0;
    int index;
    for (int i = l; i <= r; i++) {
      if (arr[x] > arr[i]) ct++;
    }
    ct += l;
    if (ct == x)
      cout << "Yes\n";
    else
      cout << "No\n";
  }
}
