#include using namespace std; using ll = long long; using ld = long double; constexpr ld PI = 3.14159265358979; constexpr ld EPS = 1e-10; int main() { cin.tie(nullptr); ios::sync_with_stdio(false); int n; cin >> n; vector px(n), py(n); vector th(n); for (int i = 0; i < n; ++i) { cin >> px[i] >> py[i]; th[i] = atan2((ld)py[i], (ld)px[i]); } sort(th.begin(), th.end()); vector tar(n); for (int i = 0; i < n; ++i) { tar[i] = lower_bound(th.begin() + i, th.end(), th[i] + PI + EPS) - th.begin(); //cerr << tar[i] << endl; } ll ans = 0; for (int i = 1; i < n - 1; ++i) { int L = lower_bound(th.begin(), th.begin() + i, th[i] - PI + EPS) - th.begin(); int R = lower_bound(th.begin() + i + 1, th.end(), th[i] + PI - EPS) - th.begin(); //cerr << L << " " << i << " " << R << endl; for (int j = L; j < i; ++j) { ans += max(R - max(i + 1, tar[j]), 0); } } cout << ans << "\n"; return 0; }