import sys
input = lambda : sys.stdin.readline().rstrip()
sys.setrecursionlimit(max(1000, 10**9))
write = lambda x: sys.stdout.write(x+"\n")


n = int(input())
xys = [None]*n
for i in range(n):
    x,y = map(int, input().split())
    xys[i] = (x,y)

def sub(p,q):
    seen = [False]*n
    ans = 0
    for start in range(n):
        if seen[start]:
            continue
        ans += 1
        qq = [start]
        seen[start] = True
        while qq:
            u = qq.pop()
            for i,(x,y) in enumerate(xys):
                if seen[i]:
                    continue
#                 print(xys[u][1], y, p, q)
                if (xys[u][0]-x, xys[u][1]-y) == (p,q) or (xys[u][0]-x, xys[u][1]-y) == (-p,-q):
                    qq.append(i)
                    seen[i] = True
    return ans
ans = 10**10
for i in range(n):
    for j in range(n):
        p = xys[i][0]-xys[j][0]
        q = xys[i][1]-xys[j][1]
        val = sub(p,q)
        ans = min(ans, val)
print(ans) import sys sys input = lambda : sys.stdin.readline().rstrip() input lambda : sys.stdin.readline().rstrip() sys.stdin.readline().rstrip() sys.stdin.readline().rstrip sys.stdin.readline() sys.stdin.readline sys.stdin sys stdin readline rstrip sys.setrecursionlimit(max(1000, 10**9)) sys.setrecursionlimit sys setrecursionlimit max(1000, 10**9) max 1000 10**9 10 9 write = lambda x: sys.stdout.write(x+"\n") write lambda x: sys.stdout.write(x+"\n") sys.stdout.write(x+"\n") sys.stdout.write sys.stdout sys stdout write x+"\n" x "\n" x n = int(input()) n int(input()) int input() input xys = [None]*n xys [None]*n [None] None n for i in range(n):
    x,y = map(int, input().split())
    xys[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 xys[i] = (x,y) xys[i] xys i (x,y) x y def sub(p,q):
    seen = [False]*n
    ans = 0
    for start in range(n):
        if seen[start]:
            continue
        ans += 1
        qq = [start]
        seen[start] = True
        while qq:
            u = qq.pop()
            for i,(x,y) in enumerate(xys):
                if seen[i]:
                    continue
#                 print(xys[u][1], y, p, q)
                if (xys[u][0]-x, xys[u][1]-y) == (p,q) or (xys[u][0]-x, xys[u][1]-y) == (-p,-q):
                    qq.append(i)
                    seen[i] = True
    return ans sub seen = [False]*n seen [False]*n [False] False n ans = 0 ans 0 for start in range(n):
        if seen[start]:
            continue
        ans += 1
        qq = [start]
        seen[start] = True
        while qq:
            u = qq.pop()
            for i,(x,y) in enumerate(xys):
                if seen[i]:
                    continue
#                 print(xys[u][1], y, p, q)
                if (xys[u][0]-x, xys[u][1]-y) == (p,q) or (xys[u][0]-x, xys[u][1]-y) == (-p,-q):
                    qq.append(i)
                    seen[i] = True
     start range(n) range n if seen[start]:
            continue
         seen[start] seen start continue ans += 1 ans 1 qq = [start] qq [start] start seen[start] = True seen[start] seen start True while qq:
            u = qq.pop()
            for i,(x,y) in enumerate(xys):
                if seen[i]:
                    continue
#                 print(xys[u][1], y, p, q)
                if (xys[u][0]-x, xys[u][1]-y) == (p,q) or (xys[u][0]-x, xys[u][1]-y) == (-p,-q):
                    qq.append(i)
                    seen[i] = True
     qq u = qq.pop() u qq.pop() qq.pop qq pop for i,(x,y) in enumerate(xys):
                if seen[i]:
                    continue
#                 print(xys[u][1], y, p, q)
                if (xys[u][0]-x, xys[u][1]-y) == (p,q) or (xys[u][0]-x, xys[u][1]-y) == (-p,-q):
                    qq.append(i)
                    seen[i] = True
     i (x,y) x y enumerate(xys) enumerate xys if seen[i]:
                    continue
#                 print(xys[u][1], y, p, q)
                 seen[i] seen i continue if (xys[u][0]-x, xys[u][1]-y) == (p,q) or (xys[u][0]-x, xys[u][1]-y) == (-p,-q):
                    qq.append(i)
                    seen[i] = True
     (xys[u][0]-x, xys[u][1]-y) == (p,q) or (xys[u][0]-x, xys[u][1]-y) == (-p,-q) (xys[u][0]-x, xys[u][1]-y) == (p,q) (xys[u][0]-x, xys[u][1]-y) xys[u][0]-x xys[u][0] [u] xys u 0 x xys[u][1]-y xys[u][1] [u] xys u 1 y (p,q) p q (xys[u][0]-x, xys[u][1]-y) == (-p,-q) (xys[u][0]-x, xys[u][1]-y) xys[u][0]-x xys[u][0] [u] xys u 0 x xys[u][1]-y xys[u][1] [u] xys u 1 y (-p,-q) -p p -q q qq.append(i) qq.append qq append i seen[i] = True seen[i] seen i True return ans ans p p q q ans = 10**10 ans 10**10 10 10 for i in range(n):
    for j in range(n):
        p = xys[i][0]-xys[j][0]
        q = xys[i][1]-xys[j][1]
        val = sub(p,q)
        ans = min(ans, val) i range(n) range n for j in range(n):
        p = xys[i][0]-xys[j][0]
        q = xys[i][1]-xys[j][1]
        val = sub(p,q)
        ans = min(ans, val) j range(n) range n p = xys[i][0]-xys[j][0] p xys[i][0]-xys[j][0] xys[i][0] [i] xys i 0 xys[j][0] [j] xys j 0 q = xys[i][1]-xys[j][1] q xys[i][1]-xys[j][1] xys[i][1] [i] xys i 1 xys[j][1] [j] xys j 1 val = sub(p,q) val sub(p,q) sub p q ans = min(ans, val) ans min(ans, val) min ans val print(ans) print ans val = sub(p,q) sub(p,q) val x,y = map(int, input().split()) map(int, input().split()) x def sub(p,q):
    seen = [False]*n
    ans = 0
    for start in range(n):
        if seen[start]:
            continue
        ans += 1
        qq = [start]
        seen[start] = True
        while qq:
            u = qq.pop()
            for i,(x,y) in enumerate(xys):
                if seen[i]:
                    continue
#                 print(xys[u][1], y, p, q)
                if (xys[u][0]-x, xys[u][1]-y) == (p,q) or (xys[u][0]-x, xys[u][1]-y) == (-p,-q):
                    qq.append(i)
                    seen[i] = True
    return ans def sub(p,q):
    seen = [False]*n
    ans = 0
    for start in range(n):
        if seen[start]:
            continue
        ans += 1
        qq = [start]
        seen[start] = True
        while qq:
            u = qq.pop()
            for i,(x,y) in enumerate(xys):
                if seen[i]:
                    continue
#                 print(xys[u][1], y, p, q)
                if (xys[u][0]-x, xys[u][1]-y) == (p,q) or (xys[u][0]-x, xys[u][1]-y) == (-p,-q):
                    qq.append(i)
                    seen[i] = True
    return ans sub n = int(input()) int(input()) n y = map(int, input().split()) map(int, input().split()) y q = xys[i][1]-xys[j][1] xys[i][1]-xys[j][1] q ans = 10**10 10**10 ans input = lambda : sys.stdin.readline().rstrip() lambda : sys.stdin.readline().rstrip() input write = lambda x: sys.stdout.write(x+"\n") lambda x: sys.stdout.write(x+"\n") write xys = [None]*n [None]*n xys ans = min(ans, val) min(ans, val) ans p = xys[i][0]-xys[j][0] xys[i][0]-xys[j][0] p
import sys
input = lambda : sys.stdin.readline().rstrip()
sys.setrecursionlimit(max(1000, 10**9))
write = lambda x: sys.stdout.write(x+"\n")


n = int(input())
xys = [None]*n
for i in range(n):
    x,y = map(int, input().split())
    xys[i] = (x,y)

def sub(p,q):
    seen = [False]*n
    ans = 0
    for start in range(n):
        if seen[start]:
            continue
        ans += 1
        qq = [start]
        seen[start] = True
        while qq:
            u = qq.pop()
            for i,(x,y) in enumerate(xys):
                if seen[i]:
                    continue
#                 print(xys[u][1], y, p, q)
                if (xys[u][0]-x, xys[u][1]-y) == (p,q) or (xys[u][0]-x, xys[u][1]-y) == (-p,-q):
                    qq.append(i)
                    seen[i] = True
    return ans
ans = 10**10
for i in range(n):
    for j in range(n):
        p = xys[i][0]-xys[j][0]
        q = xys[i][1]-xys[j][1]
        val = sub(p,q)
        ans = min(ans, val)
print(ans)