#include <bits/stdc++.h>

using namespace std;

void quicksort(double a[][3], int l, int r)
{
    if(l < r)
    {
        double pivot = a[r][2];
        int i = l;
        for(int j = l; j < r; j++)
            if(a[j][2] <= pivot)
            {
                swap(a[i][2], a[j][2]);
                swap(a[i][0], a[j][0]);
                swap(a[i][1], a[j][1]);
                i++;
            }
        swap(a[i][2], a[r][2]);
        swap(a[i][0], a[r][0]);
        swap(a[i][1], a[r][1]);
        quicksort(a, l, i-1);
        quicksort(a, i+1, r);
    }
}

int binsearch(double x, double a[][3], int l, int r)
{
    if(l <= r)
    {
        int m = (l+r)/2;
        if(a[m][2] == x)
            return m;
        else if(a[m][2] < x)
            return binsearch(x, a, m+1, r);
        else
            return binsearch(x, a, l, m-1);
    }
    return -1;
}

bool trapez(int i, int j, int k, int l, int x[], int y[])
{
    if(x[i] == x[j] || x[k] == x[l])
    {
        if(x[i] == x[j] && x[k] == x[l])
            return true;
        return false;
    }
    if(y[i] == y[j] || y[k] == y[l])
    {
        if(y[i] == y[j] && y[k] == y[l])
            return true;
        return false;
    }
    if((y[i]-y[j])/(x[i]-x[j]) == (y[k]-y[l])/(x[k]-x[l]))
        return true;
    return false;
}

int br_trapeza(int a, double rastojanje[][3], int x[], int y[], int n)
{
    int j = binsearch(2*rastojanje[a][2], rastojanje, a+1, n);
    if(j == -1)
        return false;
    int b = j, s = 0;;
    while(rastojanje[b][2] == 2*rastojanje[a][2])
    {
        int i = rastojanje[a][0], j = rastojanje[a][1], k = rastojanje[b][0], l = rastojanje[b][1];
        if(trapez(i, j, k, l, x, y))
            s++;
        b--;
    }
    b = j+1;
    while(rastojanje[b][2] == 2*rastojanje[a][2])
    {
        int i = rastojanje[a][0], j = rastojanje[a][1], k = rastojanje[b][0], l = rastojanje[b][1];
        if(trapez(i, j, k, l, x, y))
            s++;
        b++;
    }
    return s;
}

int main()
{
    int n;
    cin >> n;
    int x[n], y[n];
    for(int i = 0; i < n; i++)
        cin >> x[i] >> y[i];
    double rastojanje[n*(n-1)/2][3];
    int k = 0;
    for(int i = 0; i < n; i++)
        for(int j = i+1; j < n; j++)
        {
            rastojanje[k][0] = i;
            rastojanje[k][1] = j;
            rastojanje[k][2] = sqrt((x[i]-x[j])*(x[i]-x[j]) + (y[i]-y[j])*(y[i]-y[j]));
            k++;
        }
    quicksort(rastojanje, 0, k-1);
    int br = 0;
    for(int i = 0; i < k; i++)
        br += br_trapeza(i, rastojanje, x, y, k-1);
    cout << br;
    return 0;
}