#include <bits/stdc++.h>
using namespace std;

struct Ucenik{
    int x;
    int y;
};

long long int rastojanje(Ucenik& p, Ucenik& q){
    return (p.y - q.y) *(p.y - q.y) + (p.x - q.x) * (p.x - q.x);
}

bool comp(pair<long long int, pair<int, int>> a,
          pair<long long int, pair<int, int>> b){
    return a.first > b.first;
}


int binarnaPretraga(vector<pair<long long int, pair<int, int>>>& v,
                    long long int t){

    int l = 0, d = v.size() - 1;

    while(l < d){
        int m = l + (d - l) / 2;
        if(v[m].first >= t)
            d = m;
        else
            l = m + 1;
    }

    return d - 1;
}

bool paralelne(Ucenik& a, Ucenik& b, Ucenik& p, Ucenik& q){
    if(a.x == b.x){
        return p.x == q.x;
    }

    if(p.x != q.x){
        double k1 = (a.y - b.y) / (a.x - b.x);
        double k2 = (p.y - q.y) / (p.x - q.x);

        return k1 == k2;
    }

    return false;
}

int main(){

    int i, j, n;
    cin >> n;
    Ucenik ucenik[n];
    for(i = 0; i < n; i++)
        cin >> ucenik[i].x >> ucenik[i].y;

    vector< pair< long long int, pair<int, int> > > rastUc;
    for(i = 0; i < n; i++)
        for(j = i + 1; j < n; j++){
            long long int  r = rastojanje(ucenik[i], ucenik[j]);
            pair<int, int> par = make_pair(i, j);
            rastUc.push_back(make_pair(r, par));
        }

    sort(rastUc.begin(), rastUc.end());


    int s = 0;
    for(i = 0; i < rastUc.size(); i++){
        int l = binarnaPretraga(rastUc, 4*rastUc[i].first);
        j = l + 1;

        if(l != -1)
            while(j < rastUc.size() && rastUc[j].first == 4*rastUc[i].first){
                s += paralelne(ucenik[rastUc[i].second.first],ucenik[rastUc[i].second.second],
                               ucenik[rastUc[j].second.first],ucenik[rastUc[j].second.second]);

                j++;
            }

        cout << endl;
    }

    cout << s << endl;
    return 0;
}