#include <bits/stdc++.h>
using namespace std;
//efikasnije?
typedef long long ll;
typedef long double ld;
vector<pair<ll,ll> > duzi;
vector<pair<ll,ll> > tacke;
multiset<pair<ll,pair<ll,ll> > > ms;
int main()
{
    ios_base::sync_with_stdio(false);
    cin.tie(0);
    cout.tie(0);
    int n;
    cin>>n;
    //cout<<__gcd(1,0)<<endl;
    for(int i=0;i<n;i++)
    {
        int aa,bb;
        cin>>aa>>bb;
        tacke.push_back(make_pair(aa,bb));
    }
    for(int i=0;i<n;i++)
    {
        for(int j=i+1;j<n;j++)
        {
            ll x=tacke[i].first-tacke[j].first;
            ll y=tacke[i].second-tacke[j].second;
            ll nzd=__gcd(x,y);
            if(x!=0 && y!=0) ms.insert(make_pair(abs(x),make_pair(x/nzd,y/nzd)));
            else if(y==0) ms.insert(make_pair(abs(x),make_pair(1,0)));
            else ms.insert(make_pair(abs(y),make_pair(0,1)));
        }
    }
    ll kolko=0;
    for(auto it:ms)
    {
        //cout<<it.first<<" "<<it.second.first<<" "<<it.second.second<<endl;
        kolko+=ms.count(make_pair(2LL*it.first,make_pair(it.second.first,it.second.second)));
        kolko+=ms.count(make_pair(2LL*it.first,make_pair(-it.second.first,-it.second.second)));
    }
    cout<<kolko<<endl;

}