#include<bits/stdc++.h>
using namespace std;
#define MOD 100-1 //NA
#define ll long long int
#define rep(i,a,b) for(int i=a;i<=(int)(b);i++)
ll n,rt,ans;
ll arr[2005][2005],x[2005],y[2005];
ll sqr[50000000+10];
int main()
{
freopen("##inp.cpp","r",stdin);
//freopen("##out.cpp","w",stdout);
//ios_base::sync_with_stdio(0);
cin>>n;
rep(i,0,n-1) cin>>x[i]>>y[i];
if(n<3) {cout<<"0"; return 0;}
rep(i,0,n-1)
{
rep(j,i+1,n-1)
{
int a=x[j]-x[i],b=y[j]-y[i];
int cur=__gcd(a,b);
if(cur==0) {continue; rt++;}
a=a/cur; b=b/cur;
arr[a+500][b+500]++;
}
}
rep(i,0,3000) sqr[i*i]=i;
ans=(n*(n-1)*(n-2))/6ll;
//cout<<ans<<endl;
rep(i,1,1000)rep(j,1,1000)
{
ll cur=1+8ll*arr[i][j];
if(arr[i][j]==0) continue;
cur=(sqr[cur]+1)/2ll;
ans=ans-(cur*(cur-1)*(cur-2))/6ll;
//cc2(cur,ans);
}
ll cur=1+8ll*rt;
cur=(sqrt(cur)+1)/2ll;
ans=ans-(cur*(cur-1)*(cur-2))/6ll;
cout<<ans<<endl;
}
CiNpbmNsdWRlPGJpdHMvc3RkYysrLmg+CnVzaW5nIG5hbWVzcGFjZSBzdGQ7CiNkZWZpbmUgTU9EIDEwMC0xICAvL05BCiNkZWZpbmUgbGwgbG9uZyBsb25nIGludAojZGVmaW5lIHJlcChpLGEsYikgZm9yKGludCBpPWE7aTw9KGludCkoYik7aSsrKQoKbGwgbixydCxhbnM7CmxsIGFyclsyMDA1XVsyMDA1XSx4WzIwMDVdLHlbMjAwNV07CmxsIHNxcls1MDAwMDAwMCsxMF07CmludCBtYWluKCkKewoJZnJlb3BlbigiIyNpbnAuY3BwIiwiciIsc3RkaW4pOwogICAgLy9mcmVvcGVuKCIjI291dC5jcHAiLCJ3IixzdGRvdXQpOwoJLy9pb3NfYmFzZTo6c3luY193aXRoX3N0ZGlvKDApOwoJ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