#include <stdio.h>
#include <math.h>
float koefPravca(int a[], int b[])
{
    printf("\nA%d %d  B %d %d ", a[0], a[1], b[0], b[1]);

    if (b[0] != a[0])
        return (b[1] - a[1]) * 1.0 / (b[0] - a[0]);
    return 0;
}
float duzina(int a[], int b[])
{
    return sqrt(pow(b[0] - a[0], 2) - pow(b[1] - a[1], 2));
}
int main()
{
    int a[1500][2], N, i, br = 0, j, k, m;
    float kb, kc, kd, kdc, kbc;
    scanf("%d", &N);
    for (i = 0; i < N; i++)
        scanf("%d %d", &a[i][0], &a[i][1]);
    for (i = 0; i < N; i++)
        for (j = i + 1; j < N; j++)
            for (k = j + 1; k < N; k++)
                for (m = k + 1; m < N; m++)
                {
                    kb = koefPravca(a[i], a[j]);
                    kc = koefPravca(a[i], a[k]);
                    kd = koefPravca(a[i], a[m]);
                    kbc = koefPravca(a[j], a[k]);
                    kdc = koefPravca(a[m], a[k]);
                    printf("%f %f %f %f %f ", kb, kc, kd, kbc, kdc);
                    if (fabs(kb) == fabs(kdc) && (duzina(a[m], a[k]) == 2 * (duzina(a[i], a[j])) || (2 * duzina(a[m], a[k]) == (duzina(a[i], a[j])))))
                        br++;
                    if (fabs(kb) == fabs(kc) && (duzina(a[i], a[k]) == 2 * (duzina(a[i], a[j])) || (2 * duzina(a[i], a[k]) == (duzina(a[i], a[j])))))
                        br++;
                    if (fabs(kb) == fabs(kd) && (duzina(a[j], a[k]) == 2 * (duzina(a[i], a[j])) || (2 * duzina(a[j], a[k]) == (duzina(a[i], a[j])))))
                        br++;
                    if (fabs(kc) == fabs(kd) && (duzina(a[i], a[k]) == 2 * (duzina(a[j], a[k])) || (2 * duzina(a[i], a[k]) == (duzina(a[j], a[k])))))
                        br++;
                    if (fabs(kc) == fabs(kdc) && (duzina(a[i], a[k]) == 2 * (duzina(a[m], a[k])) || (2 * duzina(a[i], a[k]) == (duzina(a[m], a[k])))))
                        br++;
                    if (fabs(kd) == fabs(kdc) && (duzina(a[j], a[k]) == 2 * (duzina(a[m], a[k])) || (2 * duzina(a[j], a[k]) == (duzina(a[m], a[k])))))
                        br++;
                    if (fabs(kd) == fabs(kbc) && (duzina(a[i], a[m]) == 2 * (duzina(a[j], a[k])) || (2 * duzina(a[i], a[m]) == (duzina(a[j], a[k])))))
                        br++;
                }
    printf("%d", br);
    return 0;
}