inputs = readlines

coords = inputs.map{ |input|
    tmp = input.split(" ")
    x = tmp[0].to_i
    y = tmp[1].to_i
    [x, y]
}

pairs = coords.combination(2).map{ |v|
    x = v[0][0] - v[1][0]
    y = v[0][1] - v[1][1]

    if(x == 0 && y < 0)then
        y = y * -1
    elsif(x < 0)then
        x = x * -1
        y = y * -1
    end

    [x,y]
}

# p pairs
mode = pairs.group_by(&:itself).max_by{|v| v.size}.first
hoge = pairs.select{|i| i==mode || i == mode.map{|v|v * -1}}.size
# p hoge
size = inputs.size
# p size
ans = size - hoge
p ans


