I,R=input,range J=lambda:map(int,I().split()) Q=int(I()) a,b,c,d,e,f=J() X=[a,c,e,a,c] Y=[b,d,f,b,d] for i in R(3): py,qy=Y[i]+Y[i+1],2 px,qx=X[i]+X[i+1],1 r=((X[i]-X[i+1])**2+(Y[i]-Y[i+1])**2)*qx if(px-X[i+2]*qx*qy)**2+((py-Y[i+2]*qy)*qx)**2<=r:break else: #https://qiita.com/tatesuke/items/59133758ec25146766c3 L=[a*a+b*b,c*c+d*d,e*e+f*f] py,qy=(e-c)*L[0]-(e-a)*L[1]+(c-a)*L[2],2*((e-a)*(b-d)-(c-a)*(b-f)) px=((2*(b-f)*py+L[2]*qy)if(c==a)else(2*(b-d)*py+L[1]*qy))-L[0]*qy qx=2*(e-a if c==a else c-a) r=(px-a*qx*qy)**2+((py-b*qy)*qx)**2 for q in R(Q): x,y=J() print("YNeos"[(px-x*qx*qy)**2+((py-y*qy)*qx)**2>r::2])