#include <bits/stdc++.h>
using namespace std;
void swap(int *a, int *b) {
  int temp = *a;
  *a = *b;
  *b = temp;
}
int partition(int arr[], int l, int r) {
  int x = arr[r], i = l;
  for (int j = l; j <= r - 1; j++) {
    if (arr[j] <= x) {
      swap(&arr[i], &arr[j]);
      i++;
    }
  }
  swap(&arr[i], &arr[r]);
  return i;
}
int randomPartition(int arr[], int l, int r) {
  int n = r - l + 1;
  int pivot = rand() % n;
  swap(&arr[l + pivot], &arr[r]);
  return partition(arr, l, r);
}
int kthSmallest(int arr[], int l, int r, int k) {
  if (k > 0 && k <= r - l + 1) {
    int pos = randomPartition(arr, l, r);
    if (pos - l == k - 1) return arr[pos];
    if (pos - l > k - 1) return kthSmallest(arr, l, pos - 1, k);
    return kthSmallest(arr, pos + 1, r, k - pos + l - 1);
  }
  return INT_MAX;
}
int main() {
  int n, m, l, r, x;
  cin >> n >> m;
  int a[n], temp[n];
  for (int i = 0; i < n; i++) {
    cin >> a[i];
    temp[i] = a[i];
  }
  while (m--) {
    cin >> l >> r >> x;
    if (kthSmallest(temp, l - 1, r - 1, x - l + 1) == a[x - 1]) {
      cout << "Yes\n";
    } else {
      cout << "No\n";
    }
    for (int i = l - 1; i <= r - 1; i++) temp[i] = a[i];
  }
  return 0;
}
