#include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include using namespace std; typedef long long LL; typedef unsigned long long ULL; #define MEM(a,b) memset((a),(b),sizeof(a)) const LL INF = 1e9 + 7; const int N = 2e3 + 10; int flag[N]; pair vp[N]; map, vector> mc; pair check(pair& p1, pair& p2) { LL a = p2.first - p1.first; LL b = p2.second - p1.second; LL g = gcd(abs(a), abs(b)); a /= g; b /= g; if (a < 0) a = -a, b = -b; if (a == 0) b = abs(b); return { a,b }; } int main() { //freopen("input.txt", "r", stdin); //freopen("output.txt", "w", stdout); int n; scanf("%d", &n); for (int i = 1; i <= n; i++) scanf("%lld%lld", &vp[i].first, &vp[i].second); for (int i = 1; i <= n; i++) { mc.clear(); for (int j = 1; j <= n; j++) { if (i == j) continue; mc[check(vp[i], vp[j])].push_back(j); } for (auto& [x, v] : mc) { if (v.size() == 1) continue; if (v.size() > 2) { for (auto& y : v) flag[y] = 1; continue; } vector, int>> key; for (int j = 0; j < v.size(); j++) { key.emplace_back(vp[v[j]], v[j]); } key.emplace_back(vp[i], i); sort(key.begin(), key.end()); flag[key.front().second] = 1; flag[key.back().second] = 1; } } printf("%d\n", count(flag, flag + n + 1, 1)); return 0; }