#include <iostream>
#include <vector>
#include <numeric>
#include <sstream>
#include <cstdlib>
#include <string>
#include <algorithm>
#include <cmath>
#include <iterator>
#include <map>
#include <climits>
#define watch(x) cout << (#x) << " is " << (x) << endl

using namespace std;
typedef long long ll;

double S(ll x1, ll y1, ll x2, ll y2)
{
    double m = abs(y2 - y1)/ (double) abs(x2 - x1);
    return m;
}

double R(ll x1, ll y1, ll x2, ll y2)
{
    double d = sqrt(pow(x2 - x1, 2) + (double)pow(y2 - y1, 2));
    return d;
}


int main()
{
    ios_base::sync_with_stdio(false);
	cin.tie(NULL);
	ll n;
	cin>>n;
	ll r = 0;
	vector<ll> x;
	vector<ll> y;
	for(ll i = 0; i < n; ++i)
    {
        ll tx, ty;
        cin>>tx>>ty;
        x.emplace_back(tx);
        y.emplace_back(ty);
    }
    map <pair <double, double>, ll> m;
    for(ll i = 0; i < n; ++i)
    {
        for(ll j = i+1; j < n; ++j)
        {
            //watch(r);
            double s1 = S(x[i],y[i],x[j],y[j]);
            double r1 = R(x[i],y[i],x[j],y[j]);
            //watch(s1); watch(r1);
            r += m[{s1, r1}];
            m[{s1, r1*2}] = 1;
            m[{s1, r1/2}] = 1;
        }
    }
    //watch(r);
    cout<<r;
}