#include <bits/stdc++.h>

using namespace std;

bool paralelno(pair<int,int> a, pair<int,int> b, pair<int,int> c, pair<int,int> d)
{
    return (a.first-b.first)*(c.second-d.second) == (a.second-b.second)*(c.first-d.first);
}

bool dvorazlika(pair<int,int> a, pair<int,int> b, pair<int,int> c, pair<int,int> d)
{
    int dx1, dx2, dy1, dy2;
    dx1 = (a.first-b.first)*(a.first-b.first);
    dy1 = (a.second-b.second)*(a.second-b.second);
    dx2 = (c.first-d.first)*(c.first-d.first);
    dy2 = (c.second-d.second)*(c.second-d.second);
    return dx1+dy1==4*(dx2+dy2) || 4*(dx1+dy1)==dx2+dy2;
}

bool trapez(pair<int,int> a, pair<int,int> b, pair<int,int> c, pair<int,int> d)
{
    return ((paralelno(a,b,c,d)&&dvorazlika(a,b,c,d))||(paralelno(a,c,b,d)&&dvorazlika(a,c,b,d))||(paralelno(a,d,c,b)&&dvorazlika(a,d,c,b)));
}

int main()
{
    ios_base::sync_with_stdio(false);
    cin.tie(0);
    cout.tie(0);
    int n; cin>>n;
    int br = 0;
    pair<int,int> niz[1500];
    for(int i = 0; i < n; i++) cin>>niz[i].first>>niz[i].second;
    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(trapez(niz[i],niz[j],niz[k],niz[l])) br++;
    cout<<br;
    return 0;
}