#include <bits/stdc++.h>   using namespace std;   const int dx[] = {0, 1, -1, 0, 1, -1, -1, 1};   const int dy[] = {-1, 0, 0, 1, 1, 1, -1, -1};   const int N = 0;   const int MOD = 0;   const int INF = 1e9 + 10;   const long long int LLINF = 1e18 + 10;   int main() {     ios_base::sync_with_stdio(0);     cin.tie(0);     int n, m;     cin >> n >> m;     int v[10010];     int l, r, x;     for (int i = 1; i <= n; i++) {       cin >> v[i];     }     int aux;     bool mudou;     int cnt = 0;     while (m--) {       cin >> l >> r >> x;       aux = x - l;       cnt = 0;       for (int i = l; i <= r; i++) {         if (v[i] < v[x]) cnt++;       }       if (cnt == aux)         cout <<  Yes n ;       else         cout <<  No n ;     }     return 0;   }   