#include <cstdio>
#include <algorithm>
using namespace std;
#define file_in "patrate3.in"
#define file_out "patrate3.out"
#define Nmax 1010
#define f first
#define s second
pair <double, double> p[Nmax];
int i,n,j;
double mijx,mijy,dx,dy,x1,x2,x3,x0,y0,y1,y2,y3,y4;
int nrp;
double abs(double a) { return a>=0?a:-a; }
int bs(double x)
{
int ls=1;
int ld=n,mij;
while(ls<=ld)
{
mij=(ls+ld)>>1;
if (p[mij].f==x)
return 1;
if (p[mij].f<x)
ls=mij+1;
else
ld=mij-1;
mij=(ld+ls)>>1;
}
return 0;
}
int main()
{
freopen(file_in,"r",stdin);
freopen(file_out,"w",stdout);
scanf("%d", &n);
for (i=1;i<=n;++i)
scanf("%lf %lf", &p[i].f, &p[i].s);
sort(p+1,p+n+1);
/*for (i=1;i<=n;++i)
printf("%.4lf %.4lf\n", p[i].f, p[i].s);*/
nrp=0;
for (i=1;i<=n;++i)
for (j=i+1;j<=n;++j)
{
x0=p[i].f;
x1=p[j].f;
y0=p[i].s;
y1=p[j].s;
mijx=(x0+x1)/2.0;
mijy=(y0+y1)/2.0;
dx=abs(mijx-x0);
dy=abs(mijy-y0);
if (y0<y1)
{
x2=mijx+dy;
y2=mijy-dx;
x3=mijx-dy;
y3=mijy+dx;
}
else
{
x2=mijx-dy;
y2=mijy-dx;
x3=mijx+dy;
y3=mijy+dx;
}
/*// printf("%.4lf %.4lf %.4lf %.4lf %.4lf %.4lf %.4lf %.4lf\n", x0,y0,x1,y1,x2,y2,x3,y3);
if (bs(x2) && bs(x3)) */
for (int k=1;k<=n;++k)
for (int l=1;l<=n;++l)
if ((p[k].f==x2 && p[k].s==y2 && p[l].f==x3 && p[l].s==y3) ||(p[l].f==x2 && p[l].s==y2 && p[k].f==x3 && p[k].s==y3) ) {
nrp++;
//printf("%.4lf %.4lf %.4lf %.4lf %.4lf %.4lf %.4lf %.4lf\n", x0,y0,x1,y1,x2,y2,x3,y3);
}
//printf("DA\n");
}
printf("%d\n", nrp);
fclose(stdin);
fclose(stdout);
return 0;
}