#include using namespace std; using lint = long long; #define endl '\n' lint const mod = 1e9+7; //long const mod = 998244353; int main(){ lint n,q,p; cin >> n >> q >> p; lint a[n]; for(int i=0;i> a[i]; lint l[q]; lint r[q]; lint k[q]; vector>dp(n+1,vector(p,-1)); for(int i=0;i> l[i] >> r[i] >> k[i]; if(dp[r[i]][k[i]] >= l[i])cout << "Yes" << endl; else cout << "No"<