#include <bits/stdc++.h>

using namespace std;


int main()
{
    unsigned n, p = 0, duzinaIJ, duzinaKL;
    cin >> n;
    pair <long, long> koordinate[n];
    for(int i = 0; i < n; i++)
    {
        cin >> koordinate[i].first >> koordinate[i].second;
    }
    for (int i = 0; i < n; i++)
    {
        for (int j = 0; j < n; j++)
        {
            for (int k = 0; k < n; k++)
            {
                for (int l = 0; l < n; l++)
                {
                    if(i != j && i != k && i != l && j !=k && j != l && k != l)
                    {
                        if((koordinate[i].first - koordinate[j].first) / (koordinate[i].second - koordinate[j].second) == (koordinate[k].first - koordinate[l].first) / (koordinate[k].second - koordinate[l].second))
                        {
                            duzinaIJ = sqrt(pow(koordinate[j].first - koordinate[i].first, 2) + pow(koordinate[j].second - koordinate[i].second, 2));
                            duzinaKL = sqrt(pow(koordinate[l].first - koordinate[k].first, 2) + pow(koordinate[l].second - koordinate[k].second, 2));
                            if(duzinaIJ == duzinaKL * 2 || duzinaIJ * 2 == duzinaKL)
                                p++;
                        }
                    }
                }
            }
        }
    }
    cout << p / 8;
}