#include <stdio.h>
#include <stdlib.h>
#define MAX 1500
#include <math.h>

int main()
{
    
    int x[MAX];
    int y[MAX];
    int n,brojac=0;
    float duz1,duz2;
    int k,l;

    scanf("%d",&n);
    for(int i = 0;i<n;i++){
        scanf("%d%d",&x[i],&y[i]);
    }
    for(int i=0;i<n;i++){
        for(int j = 0; j<n; j++){
            k = n-1-j;
            l = n-1-i;
            duz1  = sqrt(abs(x[i]-x[j])*abs(x[i]-x[j])+ abs(y[i]-y[j])*abs(y[i]-y[j]));
            duz2  = sqrt(abs(x[k]-x[l])*abs(x[k]-x[l])+ abs(y[k]-y[l])*abs(y[k]-y[l]));
            if(duz1==2*duz2 && duz1!=0){
                brojac++;
            }
            


    }
    printf("%d",brojac/2 );
    return 0;
}