import java.util.* ;
import java.io.* ;
import java.math.* ;
class Main {
static int i,j,n,m,x[ ] = new int [ 2505 ] ,y[ ] = new int [ 2505 ] ;
static int a[ ] = new int [ 4100005 ] ;
static Map
< Long , Integer
> hashmap
= new HashMap
< Long , Integer
> ( ) ; static int gcd( int a, int b)
{
if ( b == 0 ) return a;
return gcd( b,a% b) ;
}
static int Abs( int x)
{
if ( x > 0 )
return x;
return - x;
}
Scanner sc
= new Scanner
( System .
in ) ; //new File("input.txt")); n = sc.nextInt ( ) ;
for ( i = 2 ; i <= 2000 ; i++ )
a[ i* i- i] = i;
for ( i = 0 ; i < n; i++ )
{
x[ i] = sc.nextInt ( ) ; y[ i] = sc.nextInt ( ) ;
}
for ( i = 0 ; i < n; i++ )
{
for ( j = 0 ; j < n; j++ )
if ( i != j)
{
int kc = y[ j] - y[ i] ;
int kz = x[ j] - x[ i] ;
int bc = y[ i] * ( x[ j] - x[ i] ) - x[ i] * ( y[ j] - y[ i] ) ;
int bz = x[ j] - x[ i] ;
if ( kz != 0 )
{
int tmp = gcd( Abs( kc) , Abs( kz) ) ;
kc /= tmp; kz /= tmp;
if ( kc < 0 )
{
kc = - kc; kz = - kz;
}
if ( kc == 0 )
kz = 1 ;
tmp = gcd( Abs( bc) , Abs( bz) ) ;
bc /= tmp; bz /= tmp;
if ( bc < 0 )
{
bc = - bc; bz = - bz;
}
if ( bc == 0 )
bz = 1 ;
}
else
kc = bc = x[ i] ;
long hsh = ( long ) bc* 270000 * 100000 + ( long ) bz* 9000000 + ( long ) kc* 300 + ( long ) kz;
int k = 0 ;
if ( hashmap.containsKey ( hsh) )
{
k = hashmap.get ( hsh) ;
}
hashmap.put ( hsh, k+ 2 ) ;
}
}
long ans = ( ( long ) n* ( n- 1 ) * ( n- 2 ) ) / 6 ;
Iterator < Long
> itr
= hashmap.
keySet ( ) .
iterator ( ) ; while ( itr.hasNext ( ) )
{
int tmp = hashmap.get ( itr.next ( ) ) ;
tmp = a[ tmp/ 2 ] ;
ans -=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