#include #include #include using namespace std; using ll = long long; ll cross(ll a,ll b,ll c,ll d){ return a * d - c * b; } int ccw(pair a,pair b,pair c){ ll dx = b.first - a.first; ll dy = b.second - a.second; ll ddx = c.first - b.first; ll ddy = c.second - b.second; ll now = cross(dx,dy,ddx,ddy); if(now>0) return 1; if(now<0) return -1; return 0; } int main(){ cin.tie(nullptr); ios::sync_with_stdio(false); int n = 5; vector x(n),y(n); for(int i = 0;i>x[i]>>y[i]; vector> use; for(int i = 0;i> lower,upper; { for(int i = 0;i=2){ int m = upper.size(); if(ccw(upper[m-2],upper[m-1],use[i])!=-1) upper.pop_back(); else break; } upper.push_back(use[i]); } } { for(int i = 0;i=2){ int m = lower.size(); if(ccw(lower[m-2],lower[m-1],use[i])!=1) lower.pop_back(); else break; } lower.push_back(use[i]); } } if(upper.size()+lower.size()==7) cout<<"YES\n"; else cout<<"NO\n"; }