#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define pb push_back
#define mp make_pair
#define mt make_tuple
#define fi first
#define sc second
#define th third
#define fo fourth
#define pii pair<int,int>
#define pll pair<ll,ll>
#define ldb double
#define endl "\n"
map<pair<ll,ll>,ll> m;
int main()
{
    ios::sync_with_stdio(false); cin.tie(0);
    int n;
    cin>>n;
    ll x[n],y[n];
    for(int i=0;i<n;i++)
    {
        cin>>x[i]>>y[i];
    }
    for(int i=0;i<n;i++)
    {
        for(int j=i+1;j<n;j++)
        {
            ll xsr1=x[i]+2*x[j];
            ll ysr1=y[i]+2*y[j];
            m[make_pair(xsr1,ysr1)]++;
            ll xsr2=2*x[i]+x[j];
            ll ysr2=2*y[i]+y[j];
            m[make_pair(xsr2,ysr2)]++;
        }
    }
    ll rez=0;
    for(auto i=m.begin();i!=m.end();i++)
    {
        ll br=i->second;
        rez+=br*(br-1)/2;
    }
    cout<<rez;
    return 0;
}