
#include <bits/stdc++.h>

using namespace std;

#define int long long
#define nn "\n"
#define pi pair<int, int>
#define fi first
#define se second
#define lb lower_bound
#define ub upper_bound
#define eb emplace_back
#define pb push_back
#define TASK "CTAMGIACV"

#define ms(a, x) memset(a, x, sizeof(a))
#define all(a) a.begin(), a.end()
#define All(a, n) a + 1, a + 1 + n

#define LOG 19

const int INF = 1e18;
const int mod = 1e9;
const int N = 1e5 + 5;
const int MOD = 998244353;
int n;
pi p[505];

void nhap(){
    cin >> n;
    for(int i = 1; i <= n; i++){
        cin >> p[i].fi >> p[i].se;
    }
}

void solve(){
    int ans = 0;
    for(int i = 1; i <= n; i++){
        for(int j = i + 1; j <= n; j++){
            for(int k = j + 1; k <= n; k++){
                int x1 = p[j].fi - p[i].fi;
                int y1 = p[j].se - p[i].se;
                int x2 = p[k].fi - p[i].fi;
                int y2 = p[k].se - p[i].se;
                if(x1 * x2 + y1 * y2 == 0){
                    ans++;
                    continue;
                }
                x1 = p[i].fi - p[j].fi;
                y1 = p[i].se - p[j].se;
                x2 = p[k].fi - p[j].fi;
                y2 = p[k].se - p[j].se;
                if(x1 * x2 + y1 * y2 == 0){
                    ans++;
                    continue;
                }
                x1 = p[i].fi - p[k].fi;
                y1 = p[i].se - p[k].se;
                x2 = p[j].fi - p[k].fi;
                y2 = p[j].se - p[k].se;
                if(x1 * x2 + y1 * y2 == 0){
                    ans++;
                }
            }
        }
    }
    cout << ans << nn;
}
signed main(){
    if(fopen(TASK".INP", "r")){
        freopen(TASK".INP", "r", stdin);
        freopen(TASK".OUT", "w", stdout);
    }
    ios_base::sync_with_stdio(0);
    cin.tie(0);
    cout.tie(0);
    nhap();
    solve();
    return (0 ^ 0);
}
