#include #include #define SELECTER(_1,_2,_3,SELECT,...) SELECT #define rep1(i,n) for(int i=0;i<(int)n;++i) #define rep2(i,a,n) for(int i=(int)a;i<(int)n;++i) #define rep(...) SELECTER(__VA_ARGS__,rep2,rep1)(__VA_ARGS__) #define RSELECTER(_1, _2, _3, RSELECT, ...) RSELECT #define rrep1(i,n) for(int i=(int)(n)-1;i>=0;--i) #define rrep2(i,a,n) for(int i=(int)(n)-1;i>=(int)a;--i) #define rrep(...) RSELECTER(__VA_ARGS__, rrep2, rrep1)(__VA_ARGS__) #define all(a) a.begin(),a.end() #define rall(a) a.rbegin(),a.rend() #define fi first #define se second #define PrintR LogOutput #ifdef _DEBUG #define Log(...) LogOutput(__VA_ARGS__) #else #define Log(...) #endif using namespace std; using namespace atcoder; using ll=long long; using ld=long double; using pii=pair; using pll=pair; using pdd=pair; using tp=tuple; using tpll=tuple; using veci=vector; using vecpii=vector>; using vecll=vector; using vecpll=vector>; using vecpdd=vector>; using vecs=vector; using vecb=vector; using vecd=vector; using vectp=vector; using vectpll=vector; using mint=modint998244353; using mint10=modint1000000007; template istream& operator>>(istream& in, pair& a){return in >> a.first >> a.second;} template ostream& operator<<(ostream& out, const pair& a){return out << a.first << ' ' << a.second;} ostream& operator<<(ostream& out, const mint& a){return out << a.val();} ostream& operator<<(ostream& out, const mint10& a){return out << a.val();} ostream& operator<<(ostream& out, const modint& a){return out << a.val();} template ostream& operator<<(ostream& out, const vector& d){for(int i = 0 ; i < d.size() ; ++i) out << d[i] << (i == d.size() - 1 ? "" : " "); return out;} template pair operator+(const pair& a, const pair& b){return {a.fi + b.fi, a.se + b.se};} template pair operator-(const pair& a, const pair& b){return {a.fi - b.fi, a.se - b.se};} template inline bool chmax(T& a,T b){if(a inline bool chmin(T& a,T b){if(a>b) {a=b;return true;} return false;} bool Judge(int i, int j, int h, int w){return i < 0 || j < 0 || i >= h || j >= w;} bool PrintA(int i){cout<<(i ? "Yes" : "No")<::max() >> 2; constexpr int inf=numeric_limits::max() >> 1; constexpr ll MOD=998244353; const int vi[] = {0, 1, 0, -1}, vj[] = {1, 0, -1, 0}; template void LogOutput(Args&&... args){ stringstream ss; ((ss << args << ' '), ...); cout << ss.str().substr(0, ss.str().length() - 1) << endl; } template void LogOutput(vector>& data){for(auto d : data) LogOutput(d);} const double EPS = 1e-8; template struct Point{ T x, y; Point(){} Point(T a, T b) : x(a), y(b){} Point& operator=(const Point& a){x = a.x; y = a.y; return *this;} Point operator+(const Point& a) const {return {x + a.x, y + a.y};} Point& operator+=(const Point& a){x += a.x; y += a.y; return *this;} Point operator-(const Point& a) const {return {x - a.x, y - a.y};} Point& operator-=(const Point& a){x -= a.x; y -= a.y; return *this;} template Point operator/(const S& a) const {return {x / a, y / a};} template Point operator*(const S& a) const {return {x * a, y * a};} }; template int sgn(T a){return (a < -EPS ? -1 : (a > EPS ? 1 : 0));} template std::istream& operator>>(std::istream& in, Point& a){return in >> a.x >> a.y;} template std::ostream& operator<<(std::ostream& out, const Point& a){return out << a.x << ' ' << a.y;} template bool operator<(const Point& a, const Point& b){ if(sgn(a.x - b.x)) return sgn(a.x - b.x) < 0; return sgn(a.y - b.y) < 0; } template bool operator<=(const Point& a, const Point& b){ if(sgn(a.x - b.x)) return sgn(a.x - b.x) <= 0; return sgn(a.y - b.y) <= 0; } template long double distance(const Point& a, const Point& b){ return sqrtl((a.x - b.x) * (a.x - b.x) + (a.y - b.y) * (a.y - b.y)); } template bool eq(const Point& a, const Point& b){return distance(a, b) < EPS;} template struct Line{ Point a, b; Line(Point a2, Point b2) : a(a2), b(b2){} Point large() const{return max(a, b);} Point small() const{return min(a, b);} }; long double to_radian(int theta){return (theta + 360) % 360 * M_PI / 180.0;} template T cross(const Point& a, const Point& b){return a.x * b.y - a.y * b.x;} template T dot(const Point& a, const Point& b){return a.x * b.x + a.y * b.y;} template Point rot(const Point& a, long double rad){return {cos(rad) * a.x - sin(rad) * a.y, sin(rad) * a.x + cos(rad) * a.y};} template Point rot(const Point& a, int theta){return rot(a, to_radian(theta));} template Line perpendiculer_bisecor(const Point& a, const Point& b){ return {(a + b) / 2, (a + b) / 2 + rot(a - b, 90)}; } template int ccw(const Point& a, const Point& b, const Point& c){ if(cross(b - a, c - a) > (T)EPS) return 1; if(cross(b - a, c - a) < (T)-EPS) return -1; return 0; } template bool intersect(const Line& s, const Line& t){ if(ccw(s.a, s.b, t.a) * ccw(s.a, s.b, t.b) == 0) return (s.small() <= t.large() && t.large() <= s.large()) || (t.small() <= s.large() && s.large() <= t.large()); return ccw(s.a, s.b, t.a) * ccw(s.a, s.b, t.b) <= 0 && ccw(t.a, t.b, s.a) * ccw(t.a, t.b, s.b) <= 0; } template Point intersection(const Line& s, const Line& t){ T d = cross(t.a - s.a, t.b - t.a); T d2 = cross(s.b - s.a, t.b - t.a); if(abs(d) < (T)EPS && abs(d2) < (T)EPS) return s.a; return s.a + (s.b - s.a) * d / d2; } template Point circlecenter(const Point& a, const Point& b, const Point& c){ Line l = perpendiculer_bisecor(a, b); Line l2 = perpendiculer_bisecor(a, c); return intersection(l, l2); } template bool Isupper(const Point& a){ return a.y > 0 || (a.y == 0 && a.x > 0); } template bool argument_compare(const Point& a, const Point& b){ return Isupper(a) == Isupper(b) ? cross(a, b) > 0 : Isupper(a) > Isupper(b); } template long double Distance_Point_to_Line(const Point& p, const Line& l){ if(dot(p - l.a, l.b - l.a) < 0) return distance(p, l.a); if(dot(p - l.b, l.a - l.b) < 0) return distance(p, l.b); return abs(cross(p - l.a, l.b - l.a) / distance(l.a, l.b)); } template struct Circle{ Point ct; T r; Circle(Point a, T b) : ct(a), r(b){} }; template std::vector> Circle_intersections(const Circle& a, const Circle& b){ long double d = distance(a.ct, b.ct); if(d < EPS) return {}; if(d > a.r + b.r + EPS) return {}; if(d < abs(a.r - b.r) - EPS) return {}; long double rcos = (a.r * a.r + d * d - b.r * b.r) / (2 * d); long double rsin = sqrtl(a.r * a.r - rcos * rcos); Point e = (b.ct - a.ct) / d; Point e2 = rot(e, (long double)M_PI / 2); Point e3 = rot(e, (long double)-M_PI / 2); Point p = a.ct + e * rcos + e2 * rsin; Point p2 = a.ct + e * rcos + e3 * rsin; std::vector> res(1, p); if(eq(p, p2) == 0) res.push_back(p2); return res; } int main(){ ios::sync_with_stdio(false); std::cin.tie(nullptr); int q;cin>>q; vector> a(3); rep(i, 3) cin>>a[i]; vector> b(q); rep(i, q) cin>>b[i]; ld _min = INF; Point c{0, 0}; rep(i, 3) rep(j, i + 1, 3){ int k = 0; while(k == i || k == j) k++; if(sgn(distance(a[i], a[j]) / 2 - distance(a[k], (a[i] + a[j]) / 2)) >= 0){ ld d = distance(a[i], a[j]) / 2; if(sgn(d - _min) < 0){ _min = d; c = (a[i] + a[j]) / 2; } } } if(ccw(a[0], a[1], a[2]) != 0){ Point p = circlecenter(a[0], a[1], a[2]); ld r = distance(p, a[0]); if(sgn(r - _min) < 0){ _min = r; c = p; } } rep(i, q){ ld r = (c.x - b[i].x) * (c.x - b[i].x) + (c.y - b[i].y) * (c.y - b[i].y); if(sgn(r - _min * _min) <= 0){ cout<<"Yes"<