using System;
using System.Collections.Generic;
using System.Linq;
using BitArray = System.Collections.BitArray;
using BigInteger = System.Numerics.BigInteger;

namespace AtCoderProject
{
    public class Program
    {
        public object Calc()
        {
            var N = consoleReader.Int;
            var points = consoleReader.Repeat(N).SplitInt.Select(l => new Point(l)).ToArray();
            var dic = new Dictionary<Diff, int>();

            if (N == 1) return 1;

            for (int i = 0; i < points.Length; i++)
                for (int j = 0; j < points.Length; j++)
                {
                    if (i == j) continue;
                    var diff = points[i] - points[j];
                    var count = dic.GetOrDefault(diff);
                    dic[diff] = count + 1;
                }
            return N - dic.Values.Max();
        }

        struct Point
        {
            public int x;
            public int y;
            public static Diff operator -(Point a, Point b)
            {
                return new Diff { p = a.x - b.x, q = a.y - b.y };
            }
            public Point(int[] l)
            {
                x = l[0];
                y = l[1];
            }
        }

        struct Diff : IEquatable<Diff>
        {
            public int p;
            public int q;

            public override bool Equals(object obj)
            {
                if (obj is Diff)
                {
                    return ((Diff)obj).Equals(this);
                }
                return false;
            }
            public bool Equals(Diff other) => this.p == other.p && this.q == other.q;

            public override int GetHashCode()
            {
                var hashCode = -554926429;
                hashCode = hashCode * -1521134295 + this.p.GetHashCode();
                hashCode = hashCode * -1521134295 + this.q.GetHashCode();
                return hashCode;
            }
        }


        #region いつもの
        private readonly ConsoleReader consoleReader;
        public Program(ConsoleReader consoleReader) { this.consoleReader = consoleReader; }
        static void Main() => Console.WriteLine(new Program(new ConsoleReader()).Calc()); static string AllLines<T>(IEnumerable<T> source) => string.Join("\n", source);
        #endregion
    }

    public static class DicExt
    {
        public static V GetOrDefault<K, V>(this IDictionary<K, V> dic, K key, V defaultValue = default(V))
        {
            V val;
            return dic.TryGetValue(key, out val) ? val : defaultValue;
        }
        public static V GetOrInit<K, V>(this IDictionary<K, V> dic, K key) where V : new()
        {
            V val;
            if (dic.TryGetValue(key, out val))
                return val;

            val = new V();
            dic.Add(key, val);
            return val;
        }
    }
#pragma warning disable
    public class ConsoleReader { public class SplitLine { string[] splited; public SplitLine(string line) { splited = line.Split(); } public string[] String => splited.ToArray(); public int[] Int => splited.Select(int.Parse).ToArray(); public long[] Long => splited.Select(long.Parse).ToArray(); public ulong[] ULong => splited.Select(ulong.Parse).ToArray(); public double[] Double => splited.Select(double.Parse).ToArray(); } public class RepeatLine { ConsoleReader reader; int num; public RepeatLine(ConsoleReader reader, int num) { this.reader = reader; this.num = num; } public IEnumerable<string> String { get { for (int i = 0; i < num; i++) yield return reader.String; } } public IEnumerable<int> Int { get { for (int i = 0; i < num; i++) yield return reader.Int; } } public IEnumerable<long> Long { get { for (int i = 0; i < num; i++) yield return reader.Long; } } public IEnumerable<string[]> Split { get { for (int i = 0; i < num; i++) yield return reader.Split.String; } } public IEnumerable<int[]> SplitInt { get { for (int i = 0; i < num; i++) yield return reader.Split.Int; } } } public virtual string String => Console.ReadLine(); public int Int => int.Parse(String); public long Long => long.Parse(String); public ulong ULong => ulong.Parse(String); public double Double => double.Parse(String); public SplitLine Split => new SplitLine(String); public RepeatLine Repeat(int count) => new RepeatLine(this, count); }
}

Measured memory_bytes: 13664