n = int(input())
if n == 1:
    print(1)
else:
    buf = []
    for i in range(n):
        x,y = map(int,input().split())
        buf.append([x,y])
    
    buf.sort()
    
    ans = 1e9
    for i in range(n):
        for j in range(i+1,n):
            p,q = buf[j][0]-buf[i][0],buf[j][1]-buf[i][1]
    
            ind = 0
            used = set()
            tcost = 0
            befx = 0
            befy = 0
            flag = False
            while True:
                befx,befy = buf[ind][0],buf[ind][1]
                tcost += 1
                for l in range(n):
                    if l not in used:
                        tx,ty = buf[l][0],buf[l][1]
                        if tx-befx == p and ty-befy == q:
                            befx = tx
                            befy = ty
                            used.add(l)
                while True:
                    ind += 1
                    if ind == n:
                        flag = True
                        break
                    if ind in used:
                        continue
                    else:
                        break
                if flag:
                    break
            if ans > tcost:
                # print(used)
                # print(p,q,tcost)
                ans = tcost
    
    print(ans)


 n = int(input()) n int(input()) int input() input if n == 1:
    print(1)
else:
    buf = []
    for i in range(n):
        x,y = map(int,input().split())
        buf.append([x,y])
    
    buf.sort()
    
    ans = 1e9
    for i in range(n):
        for j in range(i+1,n):
            p,q = buf[j][0]-buf[i][0],buf[j][1]-buf[i][1]
    
            ind = 0
            used = set()
            tcost = 0
            befx = 0
            befy = 0
            flag = False
            while True:
                befx,befy = buf[ind][0],buf[ind][1]
                tcost += 1
                for l in range(n):
                    if l not in used:
                        tx,ty = buf[l][0],buf[l][1]
                        if tx-befx == p and ty-befy == q:
                            befx = tx
                            befy = ty
                            used.add(l)
                while True:
                    ind += 1
                    if ind == n:
                        flag = True
                        break
                    if ind in used:
                        continue
                    else:
                        break
                if flag:
                    break
            if ans > tcost:
                # print(used)
                # print(p,q,tcost)
                ans = tcost
    
    print(ans) n == 1 n 1 print(1) print 1 buf = [] buf [] for i in range(n):
        x,y = map(int,input().split())
        buf.append([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 buf.append([x,y]) buf.append buf append [x,y] x y buf.sort() buf.sort buf sort ans = 1e9 ans 1e9 for i in range(n):
        for j in range(i+1,n):
            p,q = buf[j][0]-buf[i][0],buf[j][1]-buf[i][1]
    
            ind = 0
            used = set()
            tcost = 0
            befx = 0
            befy = 0
            flag = False
            while True:
                befx,befy = buf[ind][0],buf[ind][1]
                tcost += 1
                for l in range(n):
                    if l not in used:
                        tx,ty = buf[l][0],buf[l][1]
                        if tx-befx == p and ty-befy == q:
                            befx = tx
                            befy = ty
                            used.add(l)
                while True:
                    ind += 1
                    if ind == n:
                        flag = True
                        break
                    if ind in used:
                        continue
                    else:
                        break
                if flag:
                    break
            if ans > tcost:
                # print(used)
                # print(p,q,tcost)
                ans = tcost
    
     i range(n) range n for j in range(i+1,n):
            p,q = buf[j][0]-buf[i][0],buf[j][1]-buf[i][1]
    
            ind = 0
            used = set()
            tcost = 0
            befx = 0
            befy = 0
            flag = False
            while True:
                befx,befy = buf[ind][0],buf[ind][1]
                tcost += 1
                for l in range(n):
                    if l not in used:
                        tx,ty = buf[l][0],buf[l][1]
                        if tx-befx == p and ty-befy == q:
                            befx = tx
                            befy = ty
                            used.add(l)
                while True:
                    ind += 1
                    if ind == n:
                        flag = True
                        break
                    if ind in used:
                        continue
                    else:
                        break
                if flag:
                    break
            if ans > tcost:
                # print(used)
                # print(p,q,tcost)
                ans = tcost
    
     j range(i+1,n) range i+1 i 1 n p,q = buf[j][0]-buf[i][0],buf[j][1]-buf[i][1] p buf[j][0]-buf[i][0] buf[j][0] [j] buf j 0 buf[i][0] [i] buf i 0 q buf[j][1]-buf[i][1] buf[j][1] [j] buf j 1 buf[i][1] [i] buf i 1 ind = 0 ind 0 used = set() used set() set tcost = 0 tcost 0 befx = 0 befx 0 befy = 0 befy 0 flag = False flag False while True:
                befx,befy = buf[ind][0],buf[ind][1]
                tcost += 1
                for l in range(n):
                    if l not in used:
                        tx,ty = buf[l][0],buf[l][1]
                        if tx-befx == p and ty-befy == q:
                            befx = tx
                            befy = ty
                            used.add(l)
                while True:
                    ind += 1
                    if ind == n:
                        flag = True
                        break
                    if ind in used:
                        continue
                    else:
                        break
                if flag:
                    break
             True befx,befy = buf[ind][0],buf[ind][1] befx buf[ind][0] [ind] buf ind 0 befy buf[ind][1] [ind] buf ind 1 tcost += 1 tcost 1 for l in range(n):
                    if l not in used:
                        tx,ty = buf[l][0],buf[l][1]
                        if tx-befx == p and ty-befy == q:
                            befx = tx
                            befy = ty
                            used.add(l)
                 l range(n) range n if l not in used:
                        tx,ty = buf[l][0],buf[l][1]
                        if tx-befx == p and ty-befy == q:
                            befx = tx
                            befy = ty
                            used.add(l)
                 l not in used l used tx,ty = buf[l][0],buf[l][1] tx buf[l][0] [l] buf l 0 ty buf[l][1] [l] buf l 1 if tx-befx == p and ty-befy == q:
                            befx = tx
                            befy = ty
                            used.add(l)
                 tx-befx == p and ty-befy == q tx-befx == p tx-befx tx befx p ty-befy == q ty-befy ty befy q befx = tx befx tx befy = ty befy ty used.add(l) used.add used add l while True:
                    ind += 1
                    if ind == n:
                        flag = True
                        break
                    if ind in used:
                        continue
                    else:
                        break
                 True ind += 1 ind 1 if ind == n:
                        flag = True
                        break
                     ind == n ind n flag = True flag True break if ind in used:
                        continue
                    else:
                        break
                 ind in used ind used continue break if flag:
                    break
             flag break if ans > tcost:
                # print(used)
                # print(p,q,tcost)
                ans = tcost
    
     ans > tcost ans tcost ans = tcost ans tcost print(ans) print ans tcost += 1 1 tcost buf = [] [] buf flag = True True flag p,q = buf[j][0]-buf[i][0],buf[j][1]-buf[i][1] buf[j][0]-buf[i][0] p flag = False False flag x,y = map(int,input().split()) map(int,input().split()) x n = int(input()) int(input()) n y = map(int,input().split()) map(int,input().split()) y q = buf[j][0]-buf[i][0],buf[j][1]-buf[i][1] buf[j][1]-buf[i][1] q used = set() set() used ans = 1e9 1e9 ans befy = 0 0 befy befx,befy = buf[ind][0],buf[ind][1] buf[ind][0] befx ty = buf[l][0],buf[l][1] buf[l][1] ty befy = buf[ind][0],buf[ind][1] buf[ind][1] befy tx,ty = buf[l][0],buf[l][1] buf[l][0] tx ans = tcost tcost ans ind = 0 0 ind befx = 0 0 befx befy = ty ty befy ind += 1 1 ind tcost = 0 0 tcost befx = tx tx befx
n = int(input())
if n == 1:
    print(1)
else:
    buf = []
    for i in range(n):
        x,y = map(int,input().split())
        buf.append([x,y])
    
    buf.sort()
    
    ans = 1e9
    for i in range(n):
        for j in range(i+1,n):
            p,q = buf[j][0]-buf[i][0],buf[j][1]-buf[i][1]
    
            ind = 0
            used = set()
            tcost = 0
            befx = 0
            befy = 0
            flag = False
            while True:
                befx,befy = buf[ind][0],buf[ind][1]
                tcost += 1
                for l in range(n):
                    if l not in used:
                        tx,ty = buf[l][0],buf[l][1]
                        if tx-befx == p and ty-befy == q:
                            befx = tx
                            befy = ty
                            used.add(l)
                while True:
                    ind += 1
                    if ind == n:
                        flag = True
                        break
                    if ind in used:
                        continue
                    else:
                        break
                if flag:
                    break
            if ans > tcost:
                # print(used)
                # print(p,q,tcost)
                ans = tcost
    
    print(ans)



