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