#import <iostream>
#import <cmath>
using namespace std;

int main(){
    int n;
    cin >> n;
    int x[n] = {};
    int y[n] = {};
    for(int i = 0; i < n; i ++){
        int vrx, vry;
        cin >> vrx >> vry;
        x[i] = vrx;
        y[i] = vry;
    }
    int brnizic = (n * (n+1)) / 2;
    double nizK[brnizic] = {};
    double nizD[brnizic] = {};
    int brojac = 0;
    for(int i = 0; i < n-1; i++){
        for(int j = i + 1; j < n; j++){
            int ytr = (y[j] - y[i]);
            int xtr = (x[j] - x[i]);
            nizK[brojac] = ytr/xtr;
            nizD[brojac] = sqrt(ytr * ytr + xtr * xtr);
            brojac ++;
        }
    }
    int parovi = 0;
    for(int i = 0; i < brnizic - 1; i++){
        for(int j = i + 1; j < brnizic; j++){
            if((nizK[i] == nizK[j]) and (nizD[i] == 2 * nizD[j] or nizD[j] == 2 * nizD[i])){
                parovi ++;
            }
        }
    }
    cout << parovi;
}