#include<bits/stdc++.h>
#define ll long long
#define pb push_back
#define ff first
#define ss second
#define mp make_pair
#define sz(x) (int)(x).size()
#define all(x) x.begin(), x.end()
using namespace std;

const char nl='\n';
const int MOD=1000000007;
const int N=1505;

struct tacka{
ll x;ll y;
}niz[N];

ll dist(tacka a,tacka b){
    return (a.x-b.x)*(a.x-b.x)+(a.y-b.y)*(a.y-b.y);
}
double koef(tacka a,tacka b){
    if(a.x==b.x)return INT_MIN;
    else return (a.y-b.y)/((a.x-b.x)*1.0);
}

ll n,res;
vector<pair<double,ll>>v;
map<pair<double,ll>,ll>m;
map<pair<double,ll>,ll>::iterator it;

void solve(){
    cin>>n;
    for(int i=1;i<=n;i++){
        cin>>niz[i].x>>niz[i].y;
    }
    for(int i=1;i<=n;i++){
        for(int j=i+1;j<=n;j++){
            pair<double,ll>temp=mp(koef(niz[i],niz[j]),dist(niz[i],niz[j]));
            v.pb(temp);
            m[temp]++;
        }
    }
    for(int i=0;i<sz(v);i++){
        pair<double,ll> adr=mp(v[i].ff,v[i].ss*4);
        it=m.find(adr);
        if(it!=m.end()){
            res+=m[adr];
        }
    }
    cout<<res<<nl;
}
int main () {
cin.tie(NULL);
ios_base::sync_with_stdio(false);

int T=1;
//cin>>T;
while(T--){
    solve();
}

return 0;
}