#include <iostream>
#include <vector>
#include <algorithm>
#include <map>
#include <math.h>
using namespace std;

long int Duplicate(vector<double> vec)
{
    int cnt = 0;
    for(int i = 0; i < vec.size()-1; i++)
    {
        for(int j = i+1; j < vec.size(); j++)
        {
            if(vec[i] == vec[j])
                cnt++;
        }
    }
    return cnt;
}

long int FoundHalf(vector<double> vec)
{

     int cnt = 0;
    for(int i = 0; i < vec.size()-1; i++)
    {
        for(int j = i+1; j < vec.size(); j++)
        {
            if(vec[i] == vec[j]/2)
                cnt++;
        }
    }
    return cnt;
}

int main()
{
    cin.tie(0);
    std::ios_base::sync_with_stdio(false);

    int n;
    cin >> n;
    if(n < 4)
    {
        double x, y;
        vector<double> xs, ys;

        for(int i = 0; i < n; i++)
        {
            cin >> x >> y;
            xs.push_back(x);
            ys.push_back(y);
        }
        cout << 0 << "\n";

    }


    else
    {
        double x, y;
        int counter = 0;
        vector<double> xs, ys;

        for(int i = 0; i < n; i++)
        {
            cin >> x >> y;
            xs.push_back(x);
            ys.push_back(y);
        }
        double m, hypotenuse;
        vector<double> solution, hyp;
        for(int i = 0; i < n - 1; i++)
        {

            for(int j = i + 1; j < n; j++)
            {
                m = (ys[j] - ys[i]) / (xs[j] - xs[i]);
                hypotenuse = sqrt((xs[j]-xs[i])*(xs[j]-xs[i]) + (ys[j]-ys[i])*(ys[j]-ys[i]));
                hyp.push_back(hypotenuse);
                solution.push_back(m);

            }

        }
        sort(solution.begin(), solution.end());
        sort(hyp.begin(), hyp.end());
        long int Dup = Duplicate(solution);
        long int Fhalf = FoundHalf(hyp);

        cout << min(Dup, Fhalf) << endl;
    }
    return 0;
}