#include using ll = long long; const int maxn = 2e3 + 3; const ll mo = 1e9 + 7, tp = 166666668; int n, m; struct vec { ll x, y; vec operator-(const vec &k) const { return {x - k.x, y - k.y}; } ll cross(const vec &k) const { return x * k.y - y * k.x; } ll dot(const vec &k) const { return x * k.x + y * k.y; } double arc() const { return atan2(y, x); } } a[maxn], b[maxn]; ll ans = 0, uxs, vxs, uys, vys; void addU(int i, ll d) { uxs += b[i].x * d; uys += b[i].y * d; uxs %= mo; uys %= mo; } void addV(int i, ll d) { vxs += b[i].x * d; vys += b[i].y * d; vxs %= mo; vys %= mo; } bool check(int i, int j) { ll c = b[i].cross(b[j]); ll d = b[i].dot(b[j]); return c > 0 || c == 0 && d > 0; } void subsolve() { std::sort(b, b + m, [](const vec &u, const vec &v) { return u.arc() < v.arc(); }); uxs = vxs = uys = vys = 0; for(int i = 0; i < m; ++i) addV(i, 1); for(int i = 0, j = 0; i < m;) { while(j < m && j - i < m && check(i, j % m)) { addV(j % m, -1); addU(j % m, +1); j += 1; } vec us{uxs, uys}; vec vs{vxs, vys}; ans = (ans + b[i].cross(us) % mo - b[i].cross(vs) % mo) % mo; if(j > i) { addU(i, -1); i += 1; } else { addV(i, -1); i += 1; j += 1; } } } void solve(int s) { m = 0; for(int j = s + 1; j < n; ++j) { if(a[s].x != a[j].x || a[s].y != a[j].y) b[m++] = a[j] - a[s]; } ll oldans = ans; subsolve(); // fprintf(stderr, "%lld\n", ans - oldans); } int main() { scanf("%d", &n); for(int i = 0; i < n; ++i) { scanf("%lld%lld", &a[i].x, &a[i].y); } for(int i = 0; i < n; ++i) { solve(i); } printf("%lld\n", (ans % mo + mo) % mo); return 0; }