#include <bits/stdc++.h>
using namespace std;
void fun() {
  long long n, m;
  cin >> n >> m;
  vector<long long> v(n), dum(n);
  for (long long i = 0; i < n; i++) {
    cin >> v[i];
    dum[i] = v[i];
  }
  for (long long i = 0; i < m; i++) {
    long long l, r, x;
    cin >> l >> r >> x;
    l--;
    r--;
    x--;
    long long left = 0, right = 0;
    for (long long j = l; j < x; j++) {
      if (v[j] > v[x]) left++;
    }
    for (long long j = x + 1; j <= r; j++) {
      if (v[j] < v[x]) right++;
    }
    if (left == right) {
      cout << "Yes" << endl;
    } else
      cout << "No" << endl;
    dum = v;
  }
}
int main() {
  ios_base::sync_with_stdio(false), cin.tie(NULL);
  long long t;
  t = 1;
  for (long long i = 0; i < t; i++) fun();
}
