#include <iostream>
#include <math.h>

using namespace std;

bool dlsp(int x1, int y1, int x2, int y2, int x3, int y3, int x4, int y4)
{
    double dx1 = (1.0 * x1) - (1.0 * x2);
    double dy1 = (1.0 * y1) - (1.0 * y2);

    double dx2 = (1.0 * x3) - (1.0 * x4);
    double dy2 = (1.0 * y3) - (1.0 * y4);

    double k1 = (dy1 / dx1);
    double k2 = (dy2 / dx2);

    if (k1 == k2)
    {
        double a = sqrt(((dx1 * dx1) + (dy1 * dy1)));
        double b = sqrt(((dx2 * dx2) + (dy2 * dy2)));

        if (a == 2.0 * b || b == 2.0 * a)
        {
            return true;
        }
        else
        {
            return false;
        }
    }
    else
    {
        return false;
    }
}

int main()
{
    int n;
    cin >> n;
    int x[1500];
    int y[1500];
    int c = 0;

    for (int i = 0; i < n; i++)
    {
        cin >> x[i] >> y[i];
    }

    for (int i = 0; i < n - 3; i++)
    {
        for (int j = i + 1; j < n - 2; j++)
        {
            for (int k = j + 1; k < n - 1; k++)
            {
                for (int l = k + 1; l < n; l++)
                {
                    if (dlsp(x[i], y[i], x[j], y[j], x[k], y[k], x[l], y[l]) || dlsp(x[i], y[i], x[k], y[k], x[j], y[j], x[l], y[l]) || dlsp(x[i], y[i], x[l], y[l], x[j], y[j], x[k], y[k]))
                    {
                        c++;
                    }
                }
            }
        }
    }

    cout << c << endl;

    return 0;
}