#include <bits/stdc++.h>

using namespace std;

double raz(long int x,long int y,long int p,long int q)
{
	return sqrt((x-p)*(x-p)+(y-q)*(y-q));	
}

double kof(long int x,long int y,long int p,long int q)
{
	if(x==p)
	{
		return 1.7976931348623157E+308;
	}
	return (y-q+0.0)/(x-p+0.0);
}

bool sus(long int x,long int y,long int p,long int q,long int a,long int b,long int m,long int n)
{
	if(kof(x,y,p,q)==kof(a,b,m,n) and raz(x,y,p,q)==2*raz(a,b,m,n) or kof(x,y,p,q)==kof(a,b,m,n) and 2*raz(x,y,p,q)==raz(a,b,m,n))
	{
		return 1;
	}
	else if(kof(x,y,a,b)==kof(p,q,m,n) and raz(x,y,a,b)==2*raz(p,q,m,n) or kof(x,y,a,b)==kof(p,q,m,n) and 2*raz(x,y,a,b)==raz(p,q,m,n))
	{
		return 1;
	}
	else if(kof(x,y,m,n)==kof(p,q,a,b) and raz(x,y,m,n)==2*raz(p,q,a,b) or kof(x,y,m,n)==kof(p,q,a,b) and 2*raz(x,y,m,n)==raz(p,q,a,b))
	{
		return 1;
	}
	return 0;
}

int main()
{
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    
    int n,br=0;
    cin>>n;
    long int k[n][2];
    for(int i=0;i<n;i++)
	{
		cin>>k[i][0]>>k[i][1];
	}
	if(n<=3)
	{
		cout<<0;
	}
	else
	{
		for(int p=0;p<n-3;p++)
		{
			for(int q=p+1;q<n-2;q++)
			{
				for(int r=q+1;r<n-1;r++)
				{
					for(int s=r+1;s<n;s++)
					{
						if(sus(k[p][0],k[p][1],k[q][0],k[q][1],k[r][0],k[r][1],k[s][0],k[s][1])==1)
						{
							br=br+1;
						}
					}
				}
			}
		}
	}
	cout<<br;
    
    return 0;
}