#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, m;
  cin >> n >> m;
  int p[n], mom[m][3], arr[n], hsh;
  for (int i = 0; i < n; i++) {
    cin >> p[i];
  }
  for (int i = 0; i < m; i++) {
    cin >> mom[i][0];
    cin >> mom[i][1];
    cin >> mom[i][2];
  }
  for (int i = 0; i < m; i++) {
    int l = mom[i][0] - 1;
    int r = mom[i][1] - 1;
    int index = mom[i][2];
    int cnt = 0;
    if (l == r || (index - 1) > r || (index - 1) < l) {
      cout << "Yes\n";
      continue;
    }
    for (int j = l; j <= r; j++) {
      if (p[j] < p[index - 1]) cnt++;
    }
    if ((cnt + l + 1) == index)
      cout << "Yes\n";
    else
      cout << "No\n";
  }
  return 0;
}
