#include <bits/stdc++.h>
#define ll long long
#define ull unsigned long long
#define pb push_back
#define fi first
#define se second
#define ld long double
#define pii pair<int,int>
#define pll pair<long long,long long>
#define all(a) begin(a),end(a)
using namespace std;
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace __gnu_pbds;

#define ordered_set tree<ld, null_type,less<ld>, rb_tree_tag,tree_order_statistics_node_update>
// order_of_key -> # less than k
// find_by_order -> k-th element
// pq max element

const double eps = 0.000001;
const int modi = 1e9+7;
const int NMAX = 200010;
unordered_map<ld, vector<pii>>mapa;
void solve() {
    int n;
    cin >> n;
    vector<pii>v(n);
    for (int i = 0 ; i < n ; i++ ) {
        cin >> v[i].fi >> v[i].se;
    }
    sort(all(v));
    for (int i = 0 ; i < n ; i++ ) {
        for (int j = i+1 ; j < n ; j++ ) {
            if ( v[j].se - v[i].se == 0 ) {
                mapa[LDBL_MAX].pb({i,j});
                continue;
            }
            mapa[(v[j].fi-v[i].fi)*(ld)1.0 / (v[j].se-v[i].se)].pb({i,j});
        }
    }
    ll res = 0;
    for (auto u : mapa) {
        vector<pii> temp = u.se;
        //cout << u.fi <<"  " << temp.size() << endl;
        int k = temp.size();
        map<int,int>mapica;
        for (int i = 0 ; i < k ; i++ ) {
            pii p1 = v[temp[i].fi];
            pii p2 = v[temp[i].se];
            int x1 = p1.fi;
            int y1 = p1.se;
            int x2 = p2.fi;
            int y2 = p2.se;
            int rx = x2-x1;
            int ry = y2-y1;
            if ( u.fi == LDBL_MAX ) {
                mapica[rx]++;
            }
            else {
                mapica[ry]++;
            }
        }
        //cout << mapica.size() << endl ;
        //for (auto u : mapica) cout << u.fi <<  ' ';
        //cout << endl ;
        for (auto nesto: mapica) {
            res += nesto.se * mapica[nesto.fi * 2];
        }
        //cout << res << ' ' << mapica.size() << endl ;
    }
    cout << res << endl ;
}


int main () {
    


    
    ios_base::sync_with_stdio(false);
    cin.tie(0);
    cout.tie(0);

    int t = 1;
    
    //cin >>t ; 


    int i = 1 ;
    while(t--) {
        //cout << "Case #" << i++ << ": " ;
        solve(); 
    }
}