#include <bits/stdc++.h>

using namespace std;
struct point{
  int x;
   int y;
};
int duzina(point p1,point p2)
{
    int d=sqrt((p1.x-p2.x)*(p1.x-p2.x)+(p1.y-p2.y)*(p1.y-p2.y));
    return d;
}
int kf(point p1,point p2)
{
    int k1;
    if(p2.x-p1.x==0)k1=0;
    else  k1=(p2.y-p1.y)/(p2.x-p1.x);
    return k1;
}
int main()
{
    int n,res=0;
    cin>>n;
    point a[n];
    for(int i=0;i<n;i++) cin>> a[i].x >> a[i].y;
    int m[n][n];
    for(int i=0;i<n;i++)
     for(int j=i+1;j<n;j++)m[i][j]=duzina(a[i],a[j]);
    for(int i=0;i<n;i++){
     for(int j=i+1;j<n;j++)
        for(int k=j;k<n;k++)
        if(m[i][j]==2*m[i+1][i+k]||2*m[i][j]==m[i+1][k+i]) if(kf) res++;
    }
    cout<<res<<'\n';
    return 0;

}