#include using namespace std; typedef pair II; typedef vector< II > VII; typedef vector VI; typedef vector< VI > VVI; typedef long long int ll; #define PB push_back #define MP make_pair #define F first #define S second #define SZ(a) (int)(a.size()) #define ALL(a) a.begin(),a.end() #define SET(a,b) memset(a,b,sizeof(a)) #define forn(i, n) for(int i = 0; i < int(n); ++i) #define si(n) scanf("%d",&n) #define dout(n) printf("%d\n",n) #define sll(n) scanf("%lld",&n) #define lldout(n) printf("%lld\n",n) #define fast_io ios_base::sync_with_stdio(false);cin.tie(NULL) int arr[100]; int arr1[100]; int main() { fast_io; int a,b,c,d,e; cin>>a>>b>>c>>d; for(int i=0;i>e; while(d--) { cin>>a>>b>>c; if(a==2) cout<<"No"<