#include <bits/stdc++.h>
using namespace std;

int main()
{
    int n;
    cin >> n;
    int k;
    int x1, x2, y1, y2;
    double d;
    int brojac = 0;

    vector<pair<int, int>> koo(n);
    vector<pair<int, int>> bibl;
    if (n >= 4) {
        for (int i = 0; i < n;i++) {
            cin >> koo[i].first >> koo[i].second;
        }
        for (int i = 0; i < n - 1;i++) {
            for (int m = i + 1;m < n;m++) {
                int x1 = koo[i].first;
                int y1 = koo[i].second;
                int x2 = koo[m].first;
                int y2 = koo[m].second;
                if (x1 == x2) {
                    k = 69420;
                }
                else {
                    k = (y2 - y1) / (x2 - x1);
                }

                if (x1 == x2) {
                    d = abs(y2 - y1);
                }
                else if (y2 == y1) {
                    d = abs(x1 - x2);
                }
                else {
                    int a = abs(x1 - x2);
                    int b = abs(y2 - y1);
                    d = sqrt(a * a + b * b);
                }
                bibl.push_back(make_pair(k, d));
            }
        }
        //mozda da probam sort() jer bi onda samo isao linearno ali moze i ovako
        sort(bibl.begin(), bibl.end());
        for (int i = 0; i < bibl.size() - 1;i++) {
            for (int m = i + 1; m < bibl.size();m++) {
                if (bibl[i].first != bibl[m].first) {
                    break;
                }
                if (bibl[i].second == bibl[m].second + bibl[m].second || bibl[m].second == bibl[i].second + bibl[i].second) {
                    brojac++;
                }
            }
        }
        cout << brojac << endl;
    }
    else {
        cout << 0 << endl;
    }
    //EZ