#include <stdio.h>
#include <vector>
#include <algorithm>
using namespace std;
#define nmax 1005
#define eps 0.0001
#define pr(x) fprintf(stderr,#x" = %d\n",x)
#define pf(x) fprintf(stderr,#x" = %lf\n",x)
#define x first
#define y second
#define all(c) (c).begin(),(c).end()
typedef pair<double,double> point;
/*struct point
{
double x, y;
};*/
int n, step;
vector<point> p(nmax);
inline double abs (double x)
{
if (x >= 0)
return x;
return -x;
}
void scan ()
{
int i;
scanf ("%d", &n);
for (i=1; i<=n; ++i)
scanf ("%lf%lf", &p [i].x, &p [i].y);
for (step=1; step<=n; step<<=1);
}
int egale (double a, double b)
{
double dif;
dif=abs (a-b);
return (dif < eps);
}
int partitie (int st, int dr)
{
int i, j;
point piv, aux;
i=st-1;
j=dr+1;
piv=p [(st+dr)/2];
while (1)
{
do {++i;} while (p [i].x < piv.x || (egale (p [i].x, piv.x) && p [i].y < piv.y));
do {--j;} while (p [j].x > piv.x || (egale (p [j].x, piv.x) && p [j].y > piv.y));
if (i < j)
{
aux=p [i];
p [i]=p [j];
p [j]=aux;
}
else
return j;
}
}
void quicks (int st, int dr)
{
int p;
if (st < dr)
{
p=partitie (st, dr);
quicks (st, p);
quicks (p+1, dr);
}
}
void puncte (point A, point B, point &C, point &D)
{
point M, d;
M.x=(A.x+B.x)/2;
M.y=(A.y+B.y)/2;
d.x=abs (M.x-A.x);
d.y=abs (M.y-A.y);
if (A.y < B.y)
{
C.x=M.x+d.y;
C.y=M.y-d.x;
D.x=M.x-d.y;
D.y=M.y+d.x;
}
else
{
C.x=M.x-d.y;
C.y=M.y-d.x;
D.x=M.x+d.y;
D.y=M.y+d.x;
}
}
inline int conditie (int w, point A)
{
if (w > n)
return 0;
if (A.x > p [w].x)
return 1;
if (egale (p [w].x, A.x) && (A.y > p [w].y || egale (A.y, p [w].y)))
return 1;
return 0;
}
int egal2(double x1,double y1,double x2,double y2)
{
if(!egale(x1,x2))
return 0;
if (!egale(y1,y2))
return 0;
return 1;
}
int cautbin (point A)
{
/*int s=step, i;
for (i=0; s; s>>=1)
if (conditie (i+s, A))
i+=s;*/
vector<point>::iterator it,jt;
jt=it=lower_bound(all(p),A);
jt--;
//printf("%lf %lf %lf %lf\n",A.x,A.y,it->x,it->y);
if (!egal2(it->x,it->y,A.x,A.y)&&!egal2(jt->x,jt->y,A.x,A.y))
return 0;
//printf("%lf %lf\n",A.x,A.y);
return 1;
}
long long patrate ()
{
int i, j;
long long np=0;
point c, d;
for (i=1; i<=n; ++i)
for (j=i+1; j<=n; ++j)
{
puncte (p [i], p [j], c, d);
if (cautbin (c) && cautbin (d))
++np;
}
return np/2;
}
int main ()
{
freopen ("patrate3.in", "r", stdin);
freopen ("patrate3.out", "w", stdout);
scan ();
p.resize(n+1);
p[0].x=-9999999;
p[0].y=-9999999;
sort(all(p));
printf ("%lld\n", patrate ());
return 0;
}