#include<iostream>#include<vector>usingnamespace std;typedefstruct point {
int x;int y;}P;typedefstruct line {
int k0, k1, k2;}L;boolClassify(vector<P> A, vector<P> B, L line);//判断某条直线是否满足条件intmain(){
vector<P> A, B;
vector<L> lines;int n, m;
cin >> n >> m;for(int i =0; i < n; i++){
P p;char ch;
cin >> p.x >> p.y >> ch;if(ch =='A') A.push_back(p);else B.push_back(p);}for(int i =0; i < m; i++){
L l;
cin >> l.k0 >> l.k1 >> l.k2;
lines.push_back(l);}for(int i =0; i < m; i++)if(Classify(A, B,lines[i]))
cout <<"Yes"<< endl;else
cout <<"No"<< endl;return0;}boolClassify(vector<P> A, vector<P> B, L line){
int A_cnt =0, B_cnt =0;for(int i =0; i < A.size(); i++){
if(line.k0 + line.k1 * A[i].x + line.k2 * A[i].y >0)
A_cnt++;}for(int i =0; i < B.size(); i++){
if(line.k0 + line.k1 * B[i].x + line.k2 * B<