#include<bits/stdc++.h>

using namespace std;

struct duz{
    long long x1;
    long long y1;
    long long x2;
    long long y2;
};

pair<long long, long long> skrati(pair<long long, long long>& par){
    long long gcd = __gcd(par.first, par.second);
    par.first /= gcd;
    par.second /= gcd;
    if(par.second < 0){
        par.first *= -1;
        par.second *= -1;
    }
    return par;
}

bool valindaRazdaljina(duz a, duz b){
    long long duzinaa = (a.x2 - a.x1) * (a.x2 - a.x1) + (a.y2 - a.y1) * (a.y2 - a.y1);
    long long duzinab = (b.x2 - b.x1) * (b.x2 - b.x1) + (b.y2 - b.y1) * (b.y2 - b.y1);
    if(duzinaa * 4 == duzinab || duzinab * 4 == duzinaa)
        return true;
    return false;  
}

int main(){
    long long n;
    cin >> n;
    vector<pair<long long, long long>> tacke(n);
    for(long long i = 0 ; i < n ; i++){
        cin >> tacke[i].first >> tacke[i].second;
    }
    map<pair<long long, long long>, vector<duz>> paralelne;
    for(long long i = 0 ; i < n ; i++){
        long long x1 = tacke[i].first;
        long long y1 = tacke[i].second;
        for(long long j = i + 1 ; j < n ; j++){
            long long x2 = tacke[j].first;
            long long y2 = tacke[j].second;
            pair<long long, long long> par(y1 - y2, x1 - x2);
            skrati(par);
            duz d;
            d.x1 =  x1;
            d.x2 = x2;
            d.y1 = y1;
            d.y2 = y2;
            paralelne[par].push_back(d);
        }
    }
    long long ans = 0;
    for(auto x : paralelne){
        long long size = x.second.size();
        for(long long i = 0 ; i < size ; i++){
            for(long long j = i + 1 ; j < size ; j++){
                if(valindaRazdaljina(x.second[i], x.second[j]))
                    ans++;
            }
        }
    }
    cout << ans;
    return 0;
}