from collections import defaultdict

N = int(input())
points = [tuple(map(int, input().split()))for _ in range(N)]

if N == 1:
    print(1)
    exit(0)

points.sort(key=lambda p: p[1])
points.sort(key=lambda p: p[0])
d = defaultdict(int)
max_count = 0
max_f = None
for i in range(N):
    for j in range(i + 1, N):
        xi, yi = points[i]
        xj, yj = points[j]
        key = (xj - xi, yj - yi)
        d[key] += 1
        if d[key] > max_count:
            max_count = d[key]
            max_f = key


class UnionFind(object):

    def __init__(self, N):
        self.tree = [i for i in range(N)]
        self.rank = [0] * (N + 1)

    def find(self, x):
        if self.tree[x] == x:
            return x
        else:
            self.tree[x] = self.find(self.tree[x])  # 経路圧縮
            return self.tree[x]

    def unite(self, x, y):
        x = self.find(x)
        y = self.find(y)

        # ランクを考慮しない場合はどちらが親になっても良い
        if self.rank[x] < self.rank[y]:
            self.tree[x] = y
        else:
            self.tree[y] = x

        if self.rank[x] == self.rank[y]:
            self.rank[x] += 1

    def has_same_parent(self, x, y):
        return self.find(x) == self.find(y)


p, q = max_f
uf = UnionFind(N)
for i in range(N):
    for j in range(i + 1, N):
        xi, yi = points[i]
        xj, yj = points[j]
        if xj - xi == p and yj - yi == q:
            uf.unite(i, j)

print(len(set(uf.tree))) from collections import defaultdict N = int(input()) N int(input()) int input() input tuple(map(int, input().split()))for _ in range(N) for _ in range(N) _ range(N) range N for _ in range(N) tuple(map(int, input().split())) tuple map(int, input().split()) map int input().split() ().split () input split points = [tuple(map(int, input().split()))for _ in range(N)] points [tuple(map(int, input().split()))for _ in range(N)] if N == 1:
    print(1)
    exit(0) N == 1 N 1 print(1) print 1 exit(0) exit 0 points.sort(key=lambda p: p[1]) points.sort points sort key=lambda p: p[1] key lambda p: p[1] p[1] p 1 p points.sort(key=lambda p: p[0]) points.sort points sort key=lambda p: p[0] key lambda p: p[0] p[0] p 0 p d = defaultdict(int) d defaultdict(int) defaultdict int max_count = 0 max_count 0 max_f = None max_f None for i in range(N):
    for j in range(i + 1, N):
        xi, yi = points[i]
        xj, yj = points[j]
        key = (xj - xi, yj - yi)
        d[key] += 1
        if d[key] > max_count:
            max_count = d[key]
            max_f = key i range(N) range N for j in range(i + 1, N):
        xi, yi = points[i]
        xj, yj = points[j]
        key = (xj - xi, yj - yi)
        d[key] += 1
        if d[key] > max_count:
            max_count = d[key]
            max_f = key j range(i + 1, N) range i + 1 i 1 N xi, yi = points[i] xi points[i] points i yi xj, yj = points[j] xj points[j] points j yj key = (xj - xi, yj - yi) key (xj - xi, yj - yi) xj - xi xj xi yj - yi yj yi d[key] += 1 d[key] d key 1 if d[key] > max_count:
            max_count = d[key]
            max_f = key d[key] > max_count d[key] d key max_count max_count = d[key] max_count d[key] d key max_f = key max_f key class UnionFind(object):

    def __init__(self, N):
        self.tree = [i for i in range(N)]
        self.rank = [0] * (N + 1)

    def find(self, x):
        if self.tree[x] == x:
            return x
        else:
            self.tree[x] = self.find(self.tree[x])  # 経路圧縮
            return self.tree[x]

    def unite(self, x, y):
        x = self.find(x)
        y = self.find(y)

        # ランクを考慮しない場合はどちらが親になっても良い
        if self.rank[x] < self.rank[y]:
            self.tree[x] = y
        else:
            self.tree[y] = x

        if self.rank[x] == self.rank[y]:
            self.rank[x] += 1

    def has_same_parent(self, x, y):
        return self.find(x) == self.find(y) UnionFind def __init__(self, N):
        self.tree = [i for i in range(N)]
        self.rank = [0] * (N + 1)

     __init__ i for i in range(N) for i in range(N) i range(N) range N for i in range(N) i self.tree = [i for i in range(N)] self.tree self tree [i for i in range(N)] self.rank = [0] * (N + 1) self.rank self rank [0] * (N + 1) [0] 0 N + 1 N 1 self self N N def find(self, x):
        if self.tree[x] == x:
            return x
        else:
            self.tree[x] = self.find(self.tree[x])  # 経路圧縮
            return self.tree[x]

     find if self.tree[x] == x:
            return x
        else:
            self.tree[x] = self.find(self.tree[x])  # 経路圧縮
            return self.tree[x]

     self.tree[x] == x self.tree[x] self.tree self tree x x return x x self.tree[x] = self.find(self.tree[x]) self.tree[x] self.tree self tree x self.find(self.tree[x]) self.find self find self.tree[x] self.tree self tree x return self.tree[x] self.tree[x] self.tree self tree x self self x x def unite(self, x, y):
        x = self.find(x)
        y = self.find(y)

        # ランクを考慮しない場合はどちらが親になっても良い
        if self.rank[x] < self.rank[y]:
            self.tree[x] = y
        else:
            self.tree[y] = x

        if self.rank[x] == self.rank[y]:
            self.rank[x] += 1

     unite x = self.find(x) x self.find(x) self.find self find x y = self.find(y) y self.find(y) self.find self find y if self.rank[x] < self.rank[y]:
            self.tree[x] = y
        else:
            self.tree[y] = x

         self.rank[x] < self.rank[y] self.rank[x] self.rank self rank x self.rank[y] self.rank self rank y self.tree[x] = y self.tree[x] self.tree self tree x y self.tree[y] = x self.tree[y] self.tree self tree y x if self.rank[x] == self.rank[y]:
            self.rank[x] += 1

     self.rank[x] == self.rank[y] self.rank[x] self.rank self rank x self.rank[y] self.rank self rank y self.rank[x] += 1 self.rank[x] self.rank self rank x 1 self self x x y y def has_same_parent(self, x, y):
        return self.find(x) == self.find(y) has_same_parent return self.find(x) == self.find(y) self.find(x) == self.find(y) self.find(x) self.find self find x self.find(y) self.find self find y self self x x y y object p, q = max_f p max_f q uf = UnionFind(N) uf UnionFind(N) UnionFind N for i in range(N):
    for j in range(i + 1, N):
        xi, yi = points[i]
        xj, yj = points[j]
        if xj - xi == p and yj - yi == q:
            uf.unite(i, j) i range(N) range N for j in range(i + 1, N):
        xi, yi = points[i]
        xj, yj = points[j]
        if xj - xi == p and yj - yi == q:
            uf.unite(i, j) j range(i + 1, N) range i + 1 i 1 N xi, yi = points[i] xi points[i] points i yi xj, yj = points[j] xj points[j] points j yj if xj - xi == p and yj - yi == q:
            uf.unite(i, j) xj - xi == p and yj - yi == q xj - xi == p xj - xi xj xi p yj - yi == q yj - yi yj yi q uf.unite(i, j) uf.unite uf unite i j print(len(set(uf.tree))) print len(set(uf.tree)) len set(uf.tree) set uf.tree uf tree max_count = 0 0 max_count p, q = max_f max_f p N = int(input()) int(input()) N xj, yj = points[j] points[j] xj yi = points[i] points[i] yi max_f = None None max_f q = max_f max_f q yj = points[j] points[j] yj class UnionFind(object):

    def __init__(self, N):
        self.tree = [i for i in range(N)]
        self.rank = [0] * (N + 1)

    def find(self, x):
        if self.tree[x] == x:
            return x
        else:
            self.tree[x] = self.find(self.tree[x])  # 経路圧縮
            return self.tree[x]

    def unite(self, x, y):
        x = self.find(x)
        y = self.find(y)

        # ランクを考慮しない場合はどちらが親になっても良い
        if self.rank[x] < self.rank[y]:
            self.tree[x] = y
        else:
            self.tree[y] = x

        if self.rank[x] == self.rank[y]:
            self.rank[x] += 1

    def has_same_parent(self, x, y):
        return self.find(x) == self.find(y) class UnionFind(object):

    def __init__(self, N):
        self.tree = [i for i in range(N)]
        self.rank = [0] * (N + 1)

    def find(self, x):
        if self.tree[x] == x:
            return x
        else:
            self.tree[x] = self.find(self.tree[x])  # 経路圧縮
            return self.tree[x]

    def unite(self, x, y):
        x = self.find(x)
        y = self.find(y)

        # ランクを考慮しない場合はどちらが親になっても良い
        if self.rank[x] < self.rank[y]:
            self.tree[x] = y
        else:
            self.tree[y] = x

        if self.rank[x] == self.rank[y]:
            self.rank[x] += 1

    def has_same_parent(self, x, y):
        return self.find(x) == self.find(y) UnionFind xj, yj = points[j] points[j] xj points = [tuple(map(int, input().split()))for _ in range(N)] [tuple(map(int, input().split()))for _ in range(N)] points d = defaultdict(int) defaultdict(int) d uf = UnionFind(N) UnionFind(N) uf yi = points[i] points[i] yi max_count = d[key] d[key] max_count xi, yi = points[i] points[i] xi key = (xj - xi, yj - yi) (xj - xi, yj - yi) key max_f = key key max_f xi, yi = points[i] points[i] xi yj = points[j] points[j] yj
from collections import defaultdict

N = int(input())
points = [tuple(map(int, input().split()))for _ in range(N)]

if N == 1:
    print(1)
    exit(0)

points.sort(key=lambda p: p[1])
points.sort(key=lambda p: p[0])
d = defaultdict(int)
max_count = 0
max_f = None
for i in range(N):
    for j in range(i + 1, N):
        xi, yi = points[i]
        xj, yj = points[j]
        key = (xj - xi, yj - yi)
        d[key] += 1
        if d[key] > max_count:
            max_count = d[key]
            max_f = key


class UnionFind(object):

    def __init__(self, N):
        self.tree = [i for i in range(N)]
        self.rank = [0] * (N + 1)

    def find(self, x):
        if self.tree[x] == x:
            return x
        else:
            self.tree[x] = self.find(self.tree[x])  # 経路圧縮
            return self.tree[x]

    def unite(self, x, y):
        x = self.find(x)
        y = self.find(y)

        # ランクを考慮しない場合はどちらが親になっても良い
        if self.rank[x] < self.rank[y]:
            self.tree[x] = y
        else:
            self.tree[y] = x

        if self.rank[x] == self.rank[y]:
            self.rank[x] += 1

    def has_same_parent(self, x, y):
        return self.find(x) == self.find(y)


p, q = max_f
uf = UnionFind(N)
for i in range(N):
    for j in range(i + 1, N):
        xi, yi = points[i]
        xj, yj = points[j]
        if xj - xi == p and yj - yi == q:
            uf.unite(i, j)

print(len(set(uf.tree)))
