#include<bits/stdc++.h>

using namespace std;

typedef long long ll;
int INF = 1e8 + 1;
struct Tacka{int x; int y;};
struct Prava{double duzina; double slope;};

double distance(int x1, int y1, int x2, int y2){return sqrt( pow((x2 - x1), 2)  + pow((y2 - y1), 2));}

double slopeOf(int x1, int y1, int x2, int y2){ if(x1 == x2) return INF; return (double)(y2 - y1) / (double)(x2 - x1);}

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

        int n, x, y, brojac = 0;

        cin >> n;

        int brojSlopes = (n * (n - 1)) / 2;
        Prava prave[brojSlopes], temp;
        Tacka niz[n];

        for(int i = 0; i < n; i++) cin >> niz[i].x >> niz[i].y;

        for(int i = 0; i < n; i++){
            for(int j = i + 1; j < n; j++){
                temp.duzina = distance(niz[i].x, niz[i].y, niz[j].x, niz[j].y);
                temp.slope = slopeOf(niz[i].x, niz[i].y, niz[j].x, niz[j].y);
                prave[brojac] = temp;
                brojac++;
            }
        }

        brojac = 0;
        for(int i = 0; i < brojSlopes - 1; i++) for(int j = i + 1; j < brojSlopes; j++) if(prave[i].slope == prave[j].slope) if(prave[i].duzina / prave[j].duzina == 2 || prave[j].duzina / prave[i].duzina == 2) brojac++;
        return 0;
}