#include <bits/stdc++.h>

using namespace std;

#define ll long long
#define X first
#define Y second

int main() {
    ios_base::sync_with_stdio(false);
    cin.tie(0);
    int n;
    cin >> n;
    pair<ll, ll> a[n];
    for(int i = 0; i < n; i++) cin >> a[i].X >> a[i].Y;
    map<pair<ll, ll>, ll> m;
    for(int i = 0; i < n; i++) {
    	for(int j = i+1; j < n; j++) {
    		pair<ll, ll> p = {a[j].X - a[i].X, a[j].Y - a[i].Y};
    		if(p.X == 0) {
    			if(p.Y < 0) p.Y = -p.Y;
    		} else if(p.X < 0) {
    			p.X = -p.X;
    			p.Y = -p.Y;
    		}
    		m[p]++;
    	}
    }
    long long rez = 0;
    for(int i = 0; i < n; i++) {
    	for(int j = i+1; j < n; j++) {
    		pair<ll, ll> p = {a[j].X - a[i].X, a[j].Y - a[i].Y};
    		if(p.X == 0) {
    			if(p.Y < 0) p.Y = -p.Y;
    		} else if(p.X < 0) {
    			p.X = -p.X;
    			p.Y = -p.Y;
    		}
    		rez += m[{p.X*2, p.Y*2}];
    	}
    }
    cout << rez;
    return 0;
}