#include <iostream>
#include <algorithm>
#include <vector>
#include <limits>
#include <unordered_map>
#define forn(i, n) for (int i = 0; i < n; i++)
typedef long long ll;
#define pll pair<ll, ll>
#define par pair<pll, pll>
using namespace std;
ll gcd(ll a, ll b) {
    return b == 0 ? a : gcd(b, a % b);
}
float k(par a) {
    ll y = a.first.second - a.second.second;
    ll x = a.first.first - a.second.first;
    // y = abs(y);
    // x = abs(x);
    ll g = gcd(x, y);
    y /= g;
    x /= g;
    if (x == 0) return (y > 0 ? 1 : -1) * numeric_limits<float>::infinity();
    return y / x;
}
ll d2(par a) {
    ll x = a.first.first - a.second.first;
    ll y = a.first.second - a.second.second;
    return x * x + y * y;
}
int main() {
    ios::sync_with_stdio(false);
    cin.tie(0);
    cout.tie(0);
    int n;
    cin >> n;
    vector<pll> tak(n);
    forn(i, n) {
        ll x, y;
        cin >> x >> y;
        tak[i] = {x, y};
    }
    vector<par> parovi;
    forn(i, n) forn(j, i) parovi.push_back({tak[i], tak[j]});
    unordered_map<float, vector<par>> prave;
    for (par p: parovi) {
        float f = k(p);
        prave[f].push_back(p);
    }
    int bp = 0;
    for (auto pk: prave) {
        vector<ll> d1;
        for (par p: pk.second) d1.push_back(d2(p));
        sort(d1.begin(), d1.end());
        vector<ll> d4;
        for (ll d: d1) d4.push_back(d * 4);
        int m = d1.size();
        int c1 = 0, c2 = 0;
        while (c1 < m) {
            while (c2 < m && d1[c1] > d4[c2]) c2++;
            while (c2 < m && d1[c1] == d4[c2]) c2++, bp++;
            c1++;
        }
    }
    cout << bp << endl;
    #ifdef CHUNGUS
    system("pause");
    #endif
}