#include<iostream>
using namespace std;

int main(){
    int n,x,y;
    cin >> n;
    int nizx[n];
    int nizy[n];
    for (int i=0;i<n;i++){
        cin >> nizx[i] >> nizy[i];
    }
    float a[n*(n-1)/2];
    int r[n*(n-1)/2];
    int br=0;
    for (int i=0;i<n-1;i++){
        for (int j=i+1;j<n;j++){
            a[br]=(nizx[i]*1.0-nizx[j])/(nizy[i]-nizy[j]);
            r[br]=(nizx[i]*-nizx[j])*(nizx[i]*-nizx[j])+(nizy[i]*-nizy[j])*(nizy[i]*-nizy[j]);
            br=br+1;
        }
    }
    int brojac=0;
    for (int i=0;i<n-1;i++){
        for (int j=i+1;j<n;j++){
            if (a[i]==a[j] && (1.0*r[i]/r[j]==2.0 || 1.0*r[i]/r[j]==0.5)) {brojac=brojac+1;}
        }
    }
    cout << brojac;

    return 0;
}