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