#include <iostream>
#include <string>
#include <vector>
#include <unordered_map>
#include <cmath>

int main()
{
    int n;
    std::cin >> n;
    std::unordered_map<int, std::unordered_map<int, bool>> seen;
    std::unordered_map<int, std::unordered_map<int, std::unordered_map<int, int>>> distance;

    int res = 0;

    for (int i = 0; i < n; i++) {
        int t1, t2;
        std::cin >> t1 >> t2;
        seen[t1][t2] = true;
    }

    for (auto i = seen.begin(); i != seen.end(); i++) {
        int x1 = i->first;
        auto m2 = i->second;
        for (auto j = m2.begin(); j != m2.end(); j++) {
            int y1 = j->first;

            for (auto k = seen.begin(); k != seen.end(); k++) {
                int x2 = k->first;
                auto m3 = k->second;
                for (auto o = m3.begin(); o != m3.end(); o++) {
                    int y2 = o->first;

                    int tt = floorf(sqrt((x2 - x1) * (x2 - x1) + (y2 - y1) * (y2 - y1)) * 100);
                    int coef = 0;
                    if ((x1 - x2) == 0) {
                        coef = -457456;
                    }
                    else {
                        coef = (int)floorf(((float)(y1 - y2) / (x1 - x2)) * 100);
                    }
                    distance[tt][x1][y1] = coef;
                }
            }

        }
    }

    for (auto i = seen.begin(); i != seen.end(); i++) {
        int x1 = i->first;
        auto m2 = i->second;
        for (auto j = m2.begin(); j != m2.end(); j++) {
            int y1 = j->first;

            for (auto k = seen.begin(); k != seen.end(); k++) {
                int x2 = k->first;
                auto m3 = k->second;
                for (auto o = m3.begin(); o != m3.end(); o++) {
                    int y2 = o->first;
                    if (x1 != x2 || y1 != y2) {
                        int dist = (int)floorf(sqrt((x2 - x1) * (x2 - x1) + (y2 - y1) * (y2 - y1)) * 100);

                        int desiredDistance = dist * 2;

                        for (auto m = distance[desiredDistance].begin(); m != distance[desiredDistance].end(); m++) {
                            auto m4 = m->second;
                            for (auto l = m4.begin(); l != m4.end(); l++) {
                                if ((l->second >= distance[dist][x1][y1] - 10 && l->second <= distance[dist][x1][y1] + 10 || l->second >= distance[dist][x2][y2] - 10 && l->second <= distance[dist][x2][y2] + 10)) {
                                    res++;
                                }
                            }
                        }
                    }
                }
            }

        }
    }

    std::cout << (res) / 4 << std::endl;

}