#include //#include //using namespace atcoder; #pragma GCC target ("avx2") #pragma GCC optimization ("O3") #pragma GCC optimization ("unroll-loops") using namespace std; typedef vector VI; typedef vector VVI; typedef vector VS; typedef pair PII; typedef pair pii; typedef pair PLL; typedef pair TIII; typedef long long ll; typedef long double ld; typedef unsigned long long ull; #define FOR(i, s, n) for (int i = s; i < (int)n; ++i) #define REP(i, n) FOR(i, 0, n) #define rep(i, a, b) for (int i = a; i < (b); ++i) #define trav(a, x) for (auto &a : x) #define all(x) x.begin(), x.end() #define MOD 1000000007 template inline bool chmax(T1 &a, T2 b) {if (a < b) {a = b; return true;} return false;} template inline bool chmin(T1 &a, T2 b) {if (a > b) {a = b; return true;} return false;} const double EPS = 1e-8, PI = acos(-1); const double pi = 3.141592653589793238462643383279; //ここから編集 int main() { cin.tie(0); ios::sync_with_stdio(false); cout << fixed << setprecision(12); int n, q, p; cin >> n >> q >> p; vector a(n); REP(i,n) cin >> a[i]; vector> dp(n+1, vector(p, -1)); for(int i=0; i> l >> r >> k; if(dp[r][k] >= l-1) { cout << "Yes" << '\n'; }else{ cout << "No" << '\n'; } } return 0; }