import java.io.*;
import java.util.*;
public class Main
{
private int n;
private int[] x;
private int[] y;
private boolean[] flag;
private boolean check(int theta0, int theta1, int theta2)
{
boolean ans1 = true, ans2 = true;
for (int j = 0; j < n; j++)
{
int res = theta0 + theta1 * x[j] + theta2 * y[j];
if (res > 0 && flag[j] || res < 0 && !flag[j]);
else
{
ans1 = false;
break;
}
}
for (int j = 0; j < n; j++)
{
int res = theta0 + theta1 * x[j] + theta2 * y[j];
if (res > 0 && !flag[j] || res < 0 && flag[j]);
else
{
ans2 = false;
break;
}
}
return ans1 || ans2;
}
public Main() throws IOException
{
BufferedReader f = new BufferedReader(new InputStreamReader(System.in));
PrintWriter out = new PrintWriter(new OutputStreamWriter(System.out));
StringTokenizer st = new StringTokenizer(f.readLine());
this.n = Integer.parseInt(st.nextToken());
int m = Integer.parseInt(st.nextToken());
this.x = new int[n];
this.y = new int[n];
this.flag = new boolean[n];
for (int i = 0; i < n; i++) {
st = new StringTokenizer(f.readLine());
x[i] = Integer.parseInt(st.nextToken());
y[i] = Integer.parseInt(st.nextToken());
flag[i] = st.nextToken().equals("A");
}
for (int i = 0; i < m; i++)
{
st = new StringTokenizer(f.readLine());
int theta0 = Integer.parseInt(st.nextToken());
int theta1 = Integer.parseInt(st.nextToken());
int theta2 = Integer.parseInt(st.nextToken());
if (check(theta0, theta1, theta2))
{
out.println("Yes");
}
else
{
out.println("No");
}
}
out.close();
f.close();
}
public static void main(String[] args) throws IOException {
new Main();
}
}