#include <bits/stdc++.h>
using namespace std;
vector<int> a, c;
int main() {
  int n, m;
  cin >> n >> m;
  a.resize(n);
  for (__typeof((n)) i = (0); i < (n); i += 1) {
    cin >> a[i];
  }
  c = a;
  int z = sqrt(n);
  vector<vector<int> > b(z + 1);
  vector<pair<int, int> > d(z + 1);
  for (__typeof((z)) i = (0); i < (z); i += 1) {
    sort(c.begin() + i * z, c.begin() + (i + 1) * z);
    b[i].resize(z);
    for (__typeof(((i + 1) * z)) j = (i * z); j < ((i + 1) * z); j += 1) {
      b[i][j - i * z] = c[j];
    }
    d[i] = make_pair(i * z, (i + 1) * z);
  }
  if (z < sqrt(n)) {
    sort(c.begin() + z * z, c.end());
    b[z].resize(n - z * z);
    for (__typeof((n)) j = (z * z); j < (n); j += 1) {
      b[z][j - z * z] = c[j];
    }
    d[z] = make_pair(z * z, n);
  } else {
    b.resize(z);
    d.resize(z);
  }
  while (m--) {
    int l, r, x;
    cin >> l >> r >> x;
    l--, r--, x--;
    int less = x - l + 1;
    if (r - l <= 2 * z) {
      for (__typeof((r + 1)) i = (l); i < (r + 1); i += 1) {
        if (a[i] <= a[x]) {
          less--;
        }
      }
      if (less == 0) {
        cout << "Yes\n";
      } else {
        cout << "No\n";
      }
      continue;
    }
    int partial_segment1 = -1, partial_segment2 = -1;
    for (__typeof((b.size())) i = (0); i < (b.size()); i += 1) {
      if (l <= d[i].first && r >= d[i].second) {
        less -=
            (int)(upper_bound(b[i].begin(), b[i].end(), a[x]) - b[i].begin());
      } else if (d[i].first < l && d[i].second > l) {
        for (__typeof((d[i].second)) j = (l); j < (d[i].second); j += 1) {
          if (a[j] <= a[x]) {
            less--;
          }
        }
      } else if (r >= d[i].first && r < d[i].second) {
        partial_segment2 = i;
        for (__typeof((r + 1)) j = (d[i].first); j < (r + 1); j += 1) {
          if (a[j] <= a[x]) {
            less--;
          }
        }
      }
    }
    if (less == 0) {
      cout << "Yes\n";
    } else {
      cout << "No\n";
    }
  }
}
