import java.awt.Point;
import java.awt.geom.Line2D;
import java.io.File;
import java.util.Scanner;

/**
 * Validator for Finding Polly
 * 
 * @author vanb
 */
public class polly_validator
{
    /** Input. */
    private static Scanner sc;
    
    /**
     * Main.
     * 
     * @param args unused
     * @throws Exception
     */
    public static void main( String[] args ) throws Exception
    {
        sc = new Scanner( System.in );
               
        int n = sc.nextInt();
        boolean ok = true;
        
        int x1[] = new int[n];
        int y1[] = new int[n];
        int x2[] = new int[n];
        int y2[] = new int[n];
        for( int i=0; i<n; i++ )
        {
            x1[i] = sc.nextInt();
            y1[i] = sc.nextInt();
            x2[i] = sc.nextInt();
            y2[i] = sc.nextInt();
        }
        
        for( int i=0; i<n; i++ ) for( int j=i+1; j<n; j++ )
        {
            int dx1 = x2[i] - x1[i];
            int dy1 = y2[i] - y1[i];
            int dx2 = x1[j] - x1[i];
            int dy2 = y1[j] - y1[i];
            int dx3 = x2[j] - x1[i];
            int dy3 = y2[j] - y1[i];
            
            if( dy1*dx2==dy2*dx1 && dy1*dx3==dy3*dx1 ) ok = false;
        }
                
        System.exit( ok ? 42 : 0 );
    }

}
