#include <vector>
#include <math.h>
#include <iostream>
using namespace std;
/* run this program using the console pauser or add your own getch, system("pause") or input loop */

struct tacka{
	int x,y;
};

vector<tacka> v;

bool paralelne(tacka a, tacka b, tacka c, tacka d){
	if(a.x==b.x and c.x==d.x){
		return true;
	}
	else{
		if(a.x==b.x or c.x==d.x){
			return false;
		}
	}
	
	if((b.y-a.y)/(b.x-a.x) == (d.y-c.y) / (d.x-c.x)){
		return true;
	}
	return false;
}

double duzina(tacka a, tacka b){
	return sqrt((a.x-b.x)*(a.x-b.x) + (a.y-b.y)*(a.y-b.y));
}

bool trapez(tacka a, tacka b, tacka c, tacka d){
	if(paralelne(a,b,c,d)){
		if(duzina(a,b)==duzina(c,d)*2 or duzina(a,b)*2==duzina(c,d)){
			return true;
		}
	}
	if(paralelne(a,c,b,d)){
		if(duzina(a,c)==duzina(b,d)*2 or duzina(a,c)*2==duzina(b,d)){
			return true;
		}
	}
	if(paralelne(a,d,c,b)){
		if(duzina(a,d)==duzina(c,b)*2 or duzina(a,d)*2==duzina(c,b)){
			return true;
		}
	}
	return false;
}

int main(int argc, char** argv) {
	ios_base::sync_with_stdio(false);
	long long n,x,y,i,j,k,l;
	tacka t;
	cin>>n;
	for(i=0;i<n;i++){
		cin>>x>>y;
		t.x=x;
		t.y=y;
		v.push_back(t);
	}
	long long br=0;
	for(i=0;i<n-3;i++){
		for(j=i+1;j<n-2;j++){
			for(k=j+1;k<n-1;k++){
				for(l=k+1;l<n;l++){
					if(trapez(v[i],v[j],v[k],v[l])){
						br++;
					}
				}
			}
		}
	}
	cout<<br;
	
	return 0;
}