
import java.io.*;
import java.util.*;

/**
 * Solution to Symmetry
 *  
 * @author vanb
 */
public class symmetry_vanb
{
    public Scanner sc;
    public PrintStream ps;
    
    /**
     * Euclid's algorithm for Greatest Common Divisor
     * 
     * @param a A number
     * @param b Another number
     * @return The GCD of a & b
     */
    public int gcd( int a, int b )
    {
        return b==0 ? a : gcd( b, a%b );
    }
    
    /**
     * A Point, or a Spot.
     * 
     * @author vanb
     */
    public class Point implements Comparable<Point>
    {
        /** Coordinates */
        public int x, y;
        
        /**
         * Create a Point.
         * 
         * @param x X Coordinate
         * @param y Y Coordinate
         */
        public Point( int x, int y )
        {
            this.x = x;
            this.y = y;
        }
        
        /**
         * Create a pretty String for debugging.
         * 
         * @return A Pretty String
         */
        public String toString()
        {
            return "[" + x + "," + y + "]";
        }

        @Override
        /**
         * Compare this point to another, sorting on X coord, then Y coord.
         * 
         * @param p Another point
         * @return The usual for compareTo
         */
        public int compareTo( Point p )
        {
            int diff = x - p.x;
            if( diff==0 ) diff = y - p.y;
            return diff;
        }
    }
    
    /**
     * A Line, with the equation a*x + b*y = c
     * 
     * @author vanb
     */
    public class Line implements Comparable<Line>
    {
        /** Equation coefficients */
        public int a, b, c;
        
        /**
         * Create a Line with the equation a*x + b*y = c.
         * 
         * @param a X coefficient
         * @param b Y coefficient 
         * @param c Constant
         */
        public Line( int a, int b, int c )
        { 
            // We need to normalize a, b and c so we can compare them.
            // Start by reducing them.
            int g = gcd( Math.abs(a), gcd( Math.abs(b), Math.abs(c)) );
            a /= g;
            b /= g;
            c /= g;
            
            // Force the first non-zero term to be positive.
            if( a<0 || (a==0 && b<0) || (a==0 && b==0 && c<0) )
            {
                a = -a;
                b = -b;
                c = -c;
            }
            
            // With those two normalizations, the representation 
            // of a line should be unique.
            this.a = a;
            this.b = b;
            this.c = c;
        }
        
        /**
         * Create a pretty String for debugging
         * 
         * @return A Pretty String
         */
        public String toString()
        {
            return "[" + a + "," + b + "," + c + "]";
        }
        
        @Override
        /**
         * Compare another Line to this one.
         * 
         * @param l Another line
         * @return The usual for compareTo
         */
        public int compareTo( Line l )
        {
            int diff = a - l.a;
            if( diff==0 ) diff = b - l.b;
            if( diff==0 ) diff = c - l.c;
            return diff;
        }
    }
    
    /**
     * Driver.
     * @throws Exception
     */
    public void doit() throws Exception
    {
        sc = new Scanner( System.in );
        ps = System.out;
                
        int n = sc.nextInt();
        
        // We'll need Triangle Numbers a little later.
        // Actually, these are reverse Triangle numbers.
        // So, x is the triangle Number of triangle[x].
        int triangle[] = new int[n*(n+1)/2+1];
        Arrays.fill( triangle, 0 );
        int tri = 0;
        for( int i=1; i<=n; i++ )
        {
            tri += i;
            triangle[tri] = i;
        }
        
        // Read in the spots
        Point spots[] = new Point[n];
        for( int i=0; i<n; i++ )
        {
            // Why multiply by 2?
            // We'll be finding midpoints like [(x1+x2)/2,(y1+y2)/2].
            // Doubling the inputs assures that all the midpoints
            // coordinates will be integers, and won't change the answer.
            int x = sc.nextInt()*2;
            int y = sc.nextInt()*2;
            
            spots[i] = new Point( x, y );
        }       
        
        // There will be three types of candidates for the best symmetry:
        // Midpoints between spots, Lines through those midpoints, 
        // and Lines through the spots themselves.
        Point midpoints[] = new Point[n*(n-1)/2];
        Line midlines[] = new Line[n*(n-1)/2];
        Line lines[] = new Line[n*(n-1)/2];
        
        // We'll go through all pairs of points, creating all three types of candidates.
        int k=0;
        for( int i=0; i<n; i++ ) for( int j=i+1; j<n; j++ )
        {
            // Grab these coordinates for convenience.
            int x1 = spots[i].x;
            int y1 = spots[i].y;
            int x2 = spots[j].x;
            int y2 = spots[j].y;
            
            // First, the midpoint between the two points.
            // (See why we multiplied the inputs by 2?)
            int midx = (x1+x2)/2;
            int midy = (y1+y2)/2;
            midpoints[k] = new Point( midx, midy );
            
            // Next, a line through the midpoint,
            // perpendicular to the segment (x1,y1)-(x2,y2)
            int a = x2-x1;
            int b = y2-y1;
            int c = a*midx + b*midy;
            midlines[k] = new Line( a, b, c );
            
            // Lastly, a line through (x1,y1) and (x2,y2)
            a = y2-y1;
            b = x1-x2;
            c = a*x1 + b*y1;
            lines[k] = new Line( a, b, c );
            
            ++k;
        }
 
        // We'll sort everything.
        // For Spots, it will allow us to use Binary Search to look for a given point.
        // For the candidates, it will let us see how many candidates are the same, since
        // they'll all be grouped together.
        Arrays.sort( spots );
        Arrays.sort( midpoints );
        Arrays.sort( midlines );
        Arrays.sort( lines );
        
        // We'll find the maximum number of spots that are already symmetric 
        // about some point or line. Then, n-max will be the number of spots
        // for which we need to create a spot to match.
        int max = 0;
        
        // Special case - 1 or 2 spots, already symmetric.
        if( spots.length<3 ) max = spots.length;
        else 
        {
            // Now, go through the candidates. Start with Points.
            // For every Point in this list, there are 2 Spots
            // that are symmetric about that point.
            int count = 2;
            
            // Now, we just need to see how many Spots are symmetric
            // around the *same* point. That'll be easy, since the Points
            // are sorted, they'll all be together.
            Point lastpoint = midpoints[0];
            for( int i=1; i<midpoints.length; i++ )
            {
                Point thispoint = midpoints[i];
                
                if( thispoint.compareTo( lastpoint ) == 0 )
                {
                    // This Point is the same as the last Point.
                    // There are 2 more Spots in this batch.
                    count += 2;
                }
                else 
                {
                    // If this Point is not the same as the last Point,
                    // then we've got to close off that batch and start a new batch.
                    // This is a bit tricky - we've got to see if this midpoint
                    // matches any Spot in the input! If so, that Spot counts!
                    // Fortunately, since we sorted the Spots, we can use Binary Search.
                    if( Arrays.binarySearch( spots, lastpoint ) >= 0 ) ++count;
                    if( count>max ) max=count;
                    
                    // Start a new batch
                    count = 2;
                }
                
                lastpoint = thispoint;
            }
    
            // We'll pull the same trick with the midlines.
            count = 2;
            Line lastline = midlines[0];
            for( int i=1; i<midlines.length; i++ )
            {
                Line thisline = midlines[i];
                if( thisline.compareTo( lastline ) == 0 )
                {
                    count += 2;
                }
                else 
                {
                    // We've got to see if any other Spots lie on this line 
                    // (i.e. satisfy its equation). There are trickier ways to do this,
                    // but they require a lot of overhead. This is fast enough.
                    for( Point spot : spots ) if( lastline.a*spot.x + lastline.b*spot.y == lastline.c ) ++count;
                    if( count>max ) max=count;
                    count = 2;
                }
                
                lastline = thisline;
            }
            
            // For Lines that go through Spots, we'll use a different trick. 
            // First, we'll count the number of Lines that are the same.
            count = 1;
            lastline = lines[0];
            for( int i=1; i<lines.length; i++ )
            {
                Line thisline = lines[i];
                if( thisline.compareTo( lastline ) == 0 )
                {
                    ++count;
                }
                else 
                {
                    // Now suppose we have 2 spots.
                    //       A----B
                    // Then there's one line for them in our list: A-B
                    // Suppose we have 3 spots, like this:
                    //       A----B----C
                    // Then we'll have 3 lines like it in our list: one each for A-B, A-C and B-C
                    // Suppose we have 4 spots, like this:
                    //       A----B----C----D
                    // Then we'll have 6 lines like it in our list: one each for A-B, A-C, A-D, B-C, B-D and C-D.
                    // We're building up to the triangular numbers. If there are k Spots
                    // on the line, then there are tri(k-1) identical lines our list.
                    // So, we've got to take the number of similar lines we've seen,
                    // take the reverse triangular number, and add 1.
                    count = triangle[count]+1;
                    if( count>max ) max=count;
                    count = 1;
                }
                
                lastline = thisline;
            }
        }
        
        // And finally, the number we have to match is n minus
        // the max already matched.
        ps.println( n - max );
        //System.exit(0);
    }
        
    /**
     * @param args
     */
    public static void main( String[] args ) throws Exception
    {
        new symmetry_vanb().doit();
    }   
}
