#include <bits/stdc++.h>

using namespace std;

typedef struct {
    long long int x;
    long long int y;
}tacka;

typedef struct {
    double duzina;
    double ugao;
}prava;

double izracunaj_duzinu(long long int x, long long int y){
    return sqrt(pow(x, 2)+pow(y, 2));
}

double izracunaj_ugao(long long int x, long long int y){
    if(y == 0)
        return M_PI/2;
    if(x == 0)
        return 0;
    return atan(y/x);
}

int main()
{
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    int n;
    cin>>n;
    tacka t[n];
    for(int i=0;i<n;i++)
        cin>>t[i].x>>t[i].y;
    int broj_pravih = n * (n-1)/2;
    prava p[broj_pravih];
    int counter = 0;
    for(int i=0;i<n-1;i++){
        for(int j=i+1;j<n;j++){
            long long int x = t[j].x - t[i].x;
            long long int y = t[j].y - t[i].y;
            p[counter].duzina = izracunaj_duzinu(x, y);
            p[counter].ugao = izracunaj_ugao(x, y);
            counter++;
        }
    }
    int broj_trapeza = 0;
    for(int i=0;i<broj_pravih-1;i++){
        for(int j=i+1;j<broj_pravih;j++){
            float inverted = (p[i].ugao > 0) ? -M_PI + p[i].ugao : M_PI + p[i].ugao;
            if((p[i].ugao == p[j].ugao || inverted == p[j].ugao) && (p[i].duzina == 2 * p[j].duzina || p[i].duzina * 2 == p[j].duzina))
                broj_trapeza++;
        }
    }
    cout<<broj_trapeza;
    return 0;
}