// radC++.cpp : This file contains the 'main' function. Program execution begins and ends there.
//

#include <iostream>
#include <vector>
#include<map>
#include<algorithm>
#include <string>
#include <cstdio>
#include <utility>
#include<tuple>
#include <limits>
using namespace std;
#define ll long long



int main()
{
	ios::sync_with_stdio(false);
	cin.tie(0);
	cout.tie(0);
	int n;
	cin >> n;
	map<double, vector<double>>mapa;
	int resi = 0;

	vector<tuple<int, int>>tacke;
	int x, y;
	cin >> x >> y;
	tacke.push_back(make_tuple(x, y));
	for (int i = 1; i < n; i++)
	{

		cin >> x >> y;
		for (int j = 0; j < tacke.size(); j++)
		{
			
			double xdrugi = get<0>(tacke[j]);
			double m;
			if (xdrugi == x)
			{
				m = DBL_MAX+3;
			}
			else {

				if (xdrugi < x)

				{
					m = (y - get<1>(tacke[j])) / (x - xdrugi);
				}
				else
				{
					m = ( get<1>(tacke[j]) - y) / ( xdrugi - x);
				}
			}
			double rastojanje = sqrt(abs(xdrugi - x) * abs(xdrugi - x) + abs(get<1>(tacke[j]) - y) * abs(get<1>(tacke[j]) - y));
		//	cout << "trenutna g tacka:" << x << "," << y << " ,trenutna poredna tacka:" << xdrugi << "," << get<1>(tacke[j]) <<" , nase rastojanje:"<<rastojanje<<" , m je:"<<m<< endl;
			


			if (mapa.count((double)m)==1) {
				
				
				for (auto x : mapa[m]) {
					//out << m << " " << x << " " << rastojanje << endl;
					//cout << "x je: " << x << ", rastojanje je:" << rastojanje << endl;
					if (abs(x - 2 * rastojanje) <= 0.01)
					{
						resi++;
					}
					else
					{
						if (abs(x * 2 - rastojanje) <= 0.01)
						{
							resi++;
						}
					}
				}
				mapa[m].push_back(rastojanje);
			}
			else
			{
				vector<double>nas;
				nas.push_back(rastojanje);
				mapa.insert({ m, nas });
				//cout << mapa[m][0];
				
			}
			

		}
		tacke.push_back(make_tuple(x, y));

	}
	cout << resi;
}