#include <bits/stdc++.h>
using namespace std;
int main() {
  vector<int> arr;
  int n, m, temp;
  scanf("%d %d", &n, &m);
  for (int i = 0; i < n; i++) {
    scanf("%d", &temp);
    arr.push_back(temp);
  }
  for (int i = 0; i < m; i++) {
    int l, r, ind;
    scanf("%d %d %d", &l, &r, &ind);
    vector<int> temp, freq;
    freq.assign(n + 1, 0);
    for (int j = l - 1; j < r; j++) freq[arr[j]]++;
    for (int j = 0; j < n + 1; j++) {
      if (freq[j] == 1) temp.push_back(j);
    }
    int ind2 = ind - l;
    (temp[ind2] == arr[ind - 1]) ? printf("Yes\n") : printf("No\n");
  }
  return 0;
}
