Buggy python submission (verdict: Runtime Error):
import collections
import copy
N = int(input())

cost = 0
diff_list = []
x_y_list = []

if N == 1:
    print(1)

for n in range(N):
    x, y = map(int, input().split())
    x_y_list.append((x, y))
    cost += 1

x_y_list_copy = copy.copy(x_y_list)

for n in range(N):
    x_y = x_y_list.pop()
    x = x_y[0]
    y = x_y[1]
    for tmp_x, tmp_y in x_y_list:
        diff_list.append((x - tmp_x, y - tmp_y))

for n in range(N):
    x_y = x_y_list_copy.pop(0)
    x = x_y[0]
    y = x_y[1]
    for tmp_x, tmp_y in x_y_list_copy:
        diff_list.append((x - tmp_x, y - tmp_y))

counter = collections.Counter(diff_list)
print(cost - max(counter.values()))

Fixed submission:
import collections
import copy
import sys
N = int(input())

cost = 0
diff_list = []
x_y_list = []

if N == 1:
    print(1)
    sys.exit()

for n in range(N):
    x, y = map(int, input().split())
    x_y_list.append((x, y))
    cost += 1

x_y_list_copy = copy.copy(x_y_list)

for n in range(N):
    x_y = x_y_list.pop()
    x = x_y[0]
    y = x_y[1]
    for tmp_x, tmp_y in x_y_list:
        diff_list.append((x - tmp_x, y - tmp_y))

for n in range(N):
    x_y = x_y_list_copy.pop(0)
    x = x_y[0]
    y = x_y[1]
    for tmp_x, tmp_y in x_y_list_copy:
        diff_list.append((x - tmp_x, y - tmp_y))

counter = collections.Counter(diff_list)
print(cost - max(counter.values()))

Buggy python submission (verdict: Runtime Error):
import collections
N = int(input())

cost = 0
diff_list = []
x_y_list = []

if N == 1:
    print(1)

for n in range(N):
    x, y = map(int, input().split())
    x_y_list.append((x, y))
    cost += 1

for n in range(N):
    x, y = x_y_list.pop()
    for tmp_x, tmp_y in x_y_list:
        diff_list.append((x - tmp_x, y - tmp_y))

counter = collections.Counter(diff_list)
print(cost - max(counter.values()))

Fixed submission:
import collections
import copy
import sys
N = int(input())

cost = 0
diff_list = []
x_y_list = []

if N == 1:
    print(1)
    sys.exit()

for n in range(N):
    x, y = map(int, input().split())
    x_y_list.append((x, y))
    cost += 1

x_y_list_copy = copy.copy(x_y_list)

for n in range(N):
    x_y = x_y_list.pop()
    x = x_y[0]
    y = x_y[1]
    for tmp_x, tmp_y in x_y_list:
        diff_list.append((x - tmp_x, y - tmp_y))

for n in range(N):
    x_y = x_y_list_copy.pop(0)
    x = x_y[0]
    y = x_y[1]
    for tmp_x, tmp_y in x_y_list_copy:
        diff_list.append((x - tmp_x, y - tmp_y))

counter = collections.Counter(diff_list)
print(cost - max(counter.values()))

Buggy python submission (verdict: Runtime Error):
import collections
N = int(input())

cost = 0
diff_list = []

past_x, past_y = map(int, input().split())
cost += 1

for n in range(N - 1):
    x, y = map(int, input().split())
    diff_list.append((x - past_x, y - past_y))
    past_x = x
    past_y = y
    cost += 1

counter = collections.Counter(diff_list)

print(cost - max(counter.values()))

Fixed submission:
import collections
import copy
import sys
N = int(input())

cost = 0
diff_list = []
x_y_list = []

if N == 1:
    print(1)
    sys.exit()

for n in range(N):
    x, y = map(int, input().split())
    x_y_list.append((x, y))
    cost += 1

x_y_list_copy = copy.copy(x_y_list)

for n in range(N):
    x_y = x_y_list.pop()
    x = x_y[0]
    y = x_y[1]
    for tmp_x, tmp_y in x_y_list:
        diff_list.append((x - tmp_x, y - tmp_y))

for n in range(N):
    x_y = x_y_list_copy.pop(0)
    x = x_y[0]
    y = x_y[1]
    for tmp_x, tmp_y in x_y_list_copy:
        diff_list.append((x - tmp_x, y - tmp_y))

counter = collections.Counter(diff_list)
print(cost - max(counter.values()))