#include <bits/stdc++.h>
#define fi first
#define se second

using namespace std;

double x[1510], y[1510];

vector <vector < pair<int, int> > > v;

map <double, int> m;

int main()
{
	ios_base::sync_with_stdio(false);
	cin.tie(NULL); cout.tie(NULL);
	
	int n; cin >> n;
	
	v.resize(n * n / 2);
	
	for(int i = 0; i < n; i++) cin >> x[i] >> y[i];
	
	int br = 0;
	
	for(int i = 0; i < n; i++)
	{
		for(int j = i + 1; j < n; j++)
		{
			double k;
			
			if(x[i] != x[j]) k = 1.00000000 * (y[i] - y[j]) / (x[i] - x[j]);
			else k = 200000001;
			
			if(!m.count(k))
			{
				m.insert({k, br});

				v[br].push_back({i, j});
				
				br++;
			}
			else
			{
				v[m[k]].push_back({i, j});
			}
		}
	}
	
	int r = 0;
	
	for(int i = 0; i <= br; i++)
	{
		int N = v[i].size();
		
		for(int j = 0; j < N; j++)
		{
			for(int k = j + 1; k < N; k++)
			{
				if(abs(x[v[i][j].fi] - x[v[i][j].se]) == 2 * (abs(x[v[i][k].fi] - x[v[i][k].se])) || abs(x[v[i][k].fi] - x[v[i][k].se]) == 2 * (abs(x[v[i][j].fi] - x[v[i][j].se])))
				{						
					r++;
				}
			}
		}
		
	}
	
	cout << r;
	
	return 0;
}