#ifndef INCLUDED_MAIN #define INCLUDED_MAIN #include __FILE__ int main(){ ll n; cin>>n; vector v(n); rep(i,n) { cin>>v[i].x>>v[i].y; } ll lowidx=0; srep(i,1,n-1) { if(v[i].y0; return distsq(base,a) st; st.reserve(n); st.pb(v[0]); st.pb(v[1]); srep(i,2,n-1) { while(st.size()>=2 && Xprod(st[st.size()-2],st.back(),v[i])<=0) st.pop_back(); st.pb(v[i]); } yn(st.size()==n); } /////// library zone /////// #else #include #include using namespace std; #define rep(i,n) for(ll i=0;i #define vc vector #define pb push_back struct point { ll x; ll y; }; ll Xprod(point &o,point &a,point &b) { return (a.x-o.x)*(b.y-o.y)-(a.y-o.y)*(b.x-o.x); } ll distsq(const point& a,const point& b){ ll dx=a.x-b.x, dy=a.y-b.y; return dx*dx+dy*dy; } template bool chmin(T& a, T b){if(a > b){a = b; return true;} return false;} template bool chmax(T& a, T b){if(a < b){a = b; return true;} return false;} void no() { cout<<"No"<& a) { ll ans=0; for(auto i:a) ans+=i; return ans; } ll modpow(ll fl, ll po, ll mode) { // mode: 0=modなし, 1=modあり ll ret=1; if (mode) { while (po>0) { if (po&1) ret=(ret*fl)%mod; fl=(fl*fl)%mod; po>>=1; } } else { while (po>0) { if(po&1) ret*=fl; fl*=fl; po>>=1; } } return ret; } ll modinv(ll a, ll mod) { //拡張Euclidによるmodでの逆元, a*u+mod*v=1を解く ll b=mod,u=1,v=0; while (b) { ll t=a/b; a-=t*b; swap(a,b); u-=t*v; swap(u,v); } u%=mod; if (u < 0) u+=mod; return u; } #endif