#include "bits/stdc++.h" using namespace std; #define all(x) begin(x),end(x) template ostream& operator<<(ostream &os, const pair &p) { return os << '(' << p.first << ", " << p.second << ')'; } template::value, typename T_container::value_type>::type> ostream& operator<<(ostream &os, const T_container &v) { string sep; for (const T &x : v) os << sep << x, sep = " "; return os; } #define debug(a) cerr << "(" << #a << ": " << a << ")\n"; typedef long long ll; typedef vector vi; typedef vector vvi; typedef pair pi; const int mxN = 1e5+1, oo = 1e9; typedef complex pt; #define X real() #define Y imag() auto cross(pt u, pt v) {return (ll)u.X*v.Y-(ll)u.Y*v.X;} auto sgn(ll a) {return a==0?0:(a>0?1:-1);} auto ccw(pt p1, pt p2, pt p3) {auto u = p2-p1, v = p3-p2;return cross(u,v);} auto in(pt p1, pt p2) {return (ll)p1.X*p2.X+(ll)p1.Y*p2.Y;} auto norm2(pt p) {return (ll)p.X*p.X+(ll)p.Y*p.Y;} bool comp(const pt& a, const pt& b) { return a.X> a >> b; p = {a*2,b*2}; } typedef __int128_t lll; typedef pt P; lll circV(P p, P a, P b, P c) { // is p in the circumcircle? lll p2 = norm2(p), A = norm2(a)-p2, B = norm2(b)-p2, C = norm2(c)-p2; return ccw(p,a,b)*C + ccw(p,b,c)*A + ccw(p,c,a)*B; } bool incircle(pt p, pt a, pt b) { auto mid = (a+b)/2; return norm2(p-mid)*4 <= norm2(b-a); } int main() { ios_base::sync_with_stdio(false); cin.tie(NULL); int q; cin >> q; array cs; for(auto& i : cs) read(i); bool twop=0; for(int i=0;i<3;++i) { rotate(cs.begin(),cs.begin()+1,cs.end()); if(incircle(cs[2],cs[0],cs[1])) { twop=1; break; } } while(q--) { pt p; read(p); if(twop?incircle(p,cs[0],cs[1]):circV(p,cs[0],cs[1],cs[2])<=0) { cout << "Yes\n"; } else cout << "No\n"; } }