#include <iostream>

using namespace std;
typedef struct
{
    int x;
    int y;
} Ucenik;

Ucenik niz[1500];
int main()
{
    int n;
    cin >> n;
    int broj = 0;
    for(int i = 0; i < n; i++)
    {
        int x;
        int y;

        cin >> niz[i].x;
        cin >> niz[i].y;
    }
    for(int i = 0; i < n-3; i++)
    {
        for (int j = i+1; j <n; j++)
        {
            int x1 = abs(niz[i].x - niz[j].x);
            int y1 = abs(niz[i].y - niz[j].y);
            for(int a = i+1; a < n; a++)
            {
                if(a == j)
                    continue;
                for (int b = a+1; b<n; b++)
                {
                    if (b == j)
                        continue;
                    int x2 = abs(niz[a].x - niz[b].x);
                    int y2 = abs(niz[a].y - niz[b].y);
                    float dely;
                    float delx;


                    if(x1 == 0)
                    {

                        if (y2 > y1)
                        {
                            dely = (float)y2/(float)y1;
                        }
                        else
                        {
                            dely = (float)y1/(float)y2;
                        }

                        if(x2 == x1)
                        {
                            if(dely == 2.0)
                            {
                                broj++;
                            }
                        }
                        else
                            continue;
                    }
                    else if(y1 == 0)
                    {

                        if (x2 > x1)
                        {
                            delx = (float)x2/(float)x1;
                        }
                        else
                        {
                            delx = (float)x1/(float)x2;
                        }

                        if(y2 == y1)
                        {
                            if(delx == 2.0)
                            {
                                broj++;
                            }
                        }
                        else
                            continue;
                    }
                    else
                    {
                        if (x2 > x1)
                        {
                            delx = (float)x2/(float)x1;
                        }
                        else
                        {
                            delx = (float)x1/(float)x2;
                        }
                        if (y2 > y1)
                        {
                            dely = (float)y2/(float)y1;
                        }
                        else
                        {
                            dely = (float)y1/(float)y2;
                        }
                        if (dely == delx && dely == 2.0)
                        {
                            broj++;
                        }
                    }

                }
            }
        }
    }
    cout << broj;
    return 0;
}