#include <bits/stdc++.h>

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

}