#include <iostream>
#include <math.h>

using namespace std;

int main()
{
    int N;
    cin >> N;
    long x[N];
    long y[N];
    for(int i = 0; i < N; i++) cin >> x[i] >> y[i];
    double m[N][N];

    for(int i = 0; i < N-1; i++)
    {
        for(int j = i + 1; j < N; j++)
        {
            if(x[i] == x[j]) m[i][j] = INT_MAX;
            else m[i][j] = (double)(y[i]-y[j])/(x[i]-x[j]);
        }
    }
    int broj = 0;

    for(int i = 0; i < N-1; i++)
    {
        for(int j = i + 1; j < N; j++)
        {
            for(int k = i + 1; k < N-1; k++)
            {
                if(k!=j)
                {
                    for(int l = k+1; l < N; l++)
                    {
                        double a = sqrt((x[i]-x[j])*(x[i]-x[j]) + (y[i]-y[j])*(y[i]-y[j]));
                        double b = sqrt((x[k]-x[l])*(x[k]-x[l]) + (y[k]-y[l])*(y[k]-y[l]));
                        if(m[i][j] == m[k][l] && (a == 2*b || b == 2*a))
                        {
                            broj ++;
                        }
                    }
                }

            }
        }
    }
    cout << broj;

    return 0;
}