def main():
    n = int(input())
    a = [None]*n
    for i in range(n):
        x, y = map(int, input().split())
        a[i] = [x, y]
    p, q = 0, 0
    cnt = 0
    for i in range(n):
        for j in range(n):
            if i == j:
                continue
            sp, sq = a[i][0]-a[j][0], a[i][1]-a[j][1]
            scnt = 0
            for k in range(n):
                for l in range(n):
                    if k == l:
                        continue
                    if a[k][0]-a[l][0] == sp and a[k][1]-a[l][1] == sq:
                        scnt += 1
            if scnt > cnt:
                cnt = scnt
                p = sp
                q = sq
    print(n-cnt)

if __name__ == "__main__":
    main() def main():
    n = int(input())
    a = [None]*n
    for i in range(n):
        x, y = map(int, input().split())
        a[i] = [x, y]
    p, q = 0, 0
    cnt = 0
    for i in range(n):
        for j in range(n):
            if i == j:
                continue
            sp, sq = a[i][0]-a[j][0], a[i][1]-a[j][1]
            scnt = 0
            for k in range(n):
                for l in range(n):
                    if k == l:
                        continue
                    if a[k][0]-a[l][0] == sp and a[k][1]-a[l][1] == sq:
                        scnt += 1
            if scnt > cnt:
                cnt = scnt
                p = sp
                q = sq
    print(n-cnt) main n = int(input()) n int(input()) int input() input a = [None]*n a [None]*n [None] None n for i in range(n):
        x, y = map(int, input().split())
        a[i] = [x, y]
     i range(n) range n x, y = map(int, input().split()) x map(int, input().split()) map int input().split() ().split () input split y a[i] = [x, y] a[i] a i [x, y] x y p, q = 0, 0 p 0 q 0 cnt = 0 cnt 0 for i in range(n):
        for j in range(n):
            if i == j:
                continue
            sp, sq = a[i][0]-a[j][0], a[i][1]-a[j][1]
            scnt = 0
            for k in range(n):
                for l in range(n):
                    if k == l:
                        continue
                    if a[k][0]-a[l][0] == sp and a[k][1]-a[l][1] == sq:
                        scnt += 1
            if scnt > cnt:
                cnt = scnt
                p = sp
                q = sq
     i range(n) range n for j in range(n):
            if i == j:
                continue
            sp, sq = a[i][0]-a[j][0], a[i][1]-a[j][1]
            scnt = 0
            for k in range(n):
                for l in range(n):
                    if k == l:
                        continue
                    if a[k][0]-a[l][0] == sp and a[k][1]-a[l][1] == sq:
                        scnt += 1
            if scnt > cnt:
                cnt = scnt
                p = sp
                q = sq
     j range(n) range n if i == j:
                continue
             i == j i j continue sp, sq = a[i][0]-a[j][0], a[i][1]-a[j][1] sp a[i][0]-a[j][0] a[i][0] [i] a i 0 a[j][0] [j] a j 0 sq a[i][1]-a[j][1] a[i][1] [i] a i 1 a[j][1] [j] a j 1 scnt = 0 scnt 0 for k in range(n):
                for l in range(n):
                    if k == l:
                        continue
                    if a[k][0]-a[l][0] == sp and a[k][1]-a[l][1] == sq:
                        scnt += 1
             k range(n) range n for l in range(n):
                    if k == l:
                        continue
                    if a[k][0]-a[l][0] == sp and a[k][1]-a[l][1] == sq:
                        scnt += 1
             l range(n) range n if k == l:
                        continue
                     k == l k l continue if a[k][0]-a[l][0] == sp and a[k][1]-a[l][1] == sq:
                        scnt += 1
             a[k][0]-a[l][0] == sp and a[k][1]-a[l][1] == sq a[k][0]-a[l][0] == sp a[k][0]-a[l][0] a[k][0] [k] a k 0 a[l][0] [l] a l 0 sp a[k][1]-a[l][1] == sq a[k][1]-a[l][1] a[k][1] [k] a k 1 a[l][1] [l] a l 1 sq scnt += 1 scnt 1 if scnt > cnt:
                cnt = scnt
                p = sp
                q = sq
     scnt > cnt scnt cnt cnt = scnt cnt scnt p = sp p sp q = sq q sq print(n-cnt) print n-cnt n cnt if __name__ == "__main__":
    main() __name__ == "__main__" __name__ "__main__" main() main def main():
    n = int(input())
    a = [None]*n
    for i in range(n):
        x, y = map(int, input().split())
        a[i] = [x, y]
    p, q = 0, 0
    cnt = 0
    for i in range(n):
        for j in range(n):
            if i == j:
                continue
            sp, sq = a[i][0]-a[j][0], a[i][1]-a[j][1]
            scnt = 0
            for k in range(n):
                for l in range(n):
                    if k == l:
                        continue
                    if a[k][0]-a[l][0] == sp and a[k][1]-a[l][1] == sq:
                        scnt += 1
            if scnt > cnt:
                cnt = scnt
                p = sp
                q = sq
    print(n-cnt) def main():
    n = int(input())
    a = [None]*n
    for i in range(n):
        x, y = map(int, input().split())
        a[i] = [x, y]
    p, q = 0, 0
    cnt = 0
    for i in range(n):
        for j in range(n):
            if i == j:
                continue
            sp, sq = a[i][0]-a[j][0], a[i][1]-a[j][1]
            scnt = 0
            for k in range(n):
                for l in range(n):
                    if k == l:
                        continue
                    if a[k][0]-a[l][0] == sp and a[k][1]-a[l][1] == sq:
                        scnt += 1
            if scnt > cnt:
                cnt = scnt
                p = sp
                q = sq
    print(n-cnt) main
def main():
    n = int(input())
    a = [None]*n
    for i in range(n):
        x, y = map(int, input().split())
        a[i] = [x, y]
    p, q = 0, 0
    cnt = 0
    for i in range(n):
        for j in range(n):
            if i == j:
                continue
            sp, sq = a[i][0]-a[j][0], a[i][1]-a[j][1]
            scnt = 0
            for k in range(n):
                for l in range(n):
                    if k == l:
                        continue
                    if a[k][0]-a[l][0] == sp and a[k][1]-a[l][1] == sq:
                        scnt += 1
            if scnt > cnt:
                cnt = scnt
                p = sp
                q = sq
    print(n-cnt)

if __name__ == "__main__":
    main()