#include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #define llint long long #define inf 1e18 #define rep(x, s, t) for(llint (x) = (s); (x) < (t); (x)++) #define Rep(x, s, t) for(llint (x) = (s); (x) <= (t); (x)++) #define chmin(x, y) (x) = min((x), (y)) #define chmax(x, y) (x) = max((x), (y)) #define PI 3.141592653589793238462643383279502884197169393 #define eps 1e-12 #define mod 1000000007 using namespace std; typedef pair P; llint n; llint x[2005], y[2005]; vector

vec; int main(void) { ios::sync_with_stdio(0); cin.tie(0); cin >> n; for(int i = 1; i <= n; i++) cin >> x[i] >> y[i]; llint ans = 0; for(int i = 1; i <= n; i++){ vec.clear(); for(int j = 1; j <= n; j++){ if(i == j) continue; vec.push_back(P(atan2((long double)y[j]-y[i], (long double)x[j]-x[i]), j)); } sort(vec.begin(), vec.end()); for(int j = 0; j < n-1; j++){ vec.push_back(vec[j]); vec.back().first += 2 * PI; } llint l = 0, r = 0; for(int j = 0; j < n-1; j++){ long double ang = vec[j].first; llint id = vec[j].second; while(vec[l+1].first <= ang+eps) l++; while(vec[r+1].first < ang+PI-eps) r++; llint tmp = (x[i]*y[id]%mod + mod - x[id]*y[i]%mod) % mod; tmp *= r-l, tmp %= mod; ans += tmp, ans %= mod; } } cout << ans << endl; return 0; }