#include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #define popcount __builtin_popcount using namespace std; typedef long long int ll; //typedef pair P; typedef pair P; vector

sort_points(vector

v){ int n=v.size(); vector

p1, p2; int z=0; for(int i=0; i0 || (x<0 && y==0)) p2.push_back({x, y}); else p1.push_back({x, y}); } auto comp=[](P p, P q){ return p.first*q.second>p.second*q.first;}; sort(p1.begin(), p1.end(), comp); sort(p2.begin(), p2.end(), comp); vector

ret; for(auto p:p1) ret.push_back(p); //while(z--) ret.push_back({0, 0}); for(auto p:p2) ret.push_back(p); return ret; } const ll MOD=1e9+7; int main() { int n; cin>>n; ll x[2020], y[2020]; for(int i=0; i>x[i]>>y[i]; ll ans=0; for(int i=0; i v(n); for(int j=0; j0; else if(v[l].first*v[r%m].first+v[l].second*v[r%m].second>0) return l<(r%m); else return false; }; int r=1; for(int l=0; l