#include <algorithm>
#include <bits/stdc++.h>
#include <cstdint>
#include <iostream>
#include <iterator>
#include <utility>
#include <vector>

// lib/next_combination.hpp
#ifndef NEXT_COMBINATION_HPP
#define NEXT_COMBINATION_HPP


/*
usage:

// 9-choose-3
std::string s = "123456789";
std::size_t k = 3;
do {
  std::cout << std::string(s.begin(), s.begin() + k) << std::endl;
} while(tools::next_combination(s.begin(), s.begin() + k, s.end()));
*/

// Source: Stack Overflow ( https://stackoverflow.com/questions/5095407/all-combinations-of-k-elements-out-of-n/5097100#5097100 )
// Author: Thomas Draper
// CC BY-SA 3.0
namespace tools {
  template <typename Iterator>
  inline bool next_combination(const Iterator first, Iterator k, const Iterator last) {
    if ((first == last) || (first == k) || (last == k)) return false;
    Iterator itr1 = first;
    Iterator itr2 = last;
    ++itr1;
    if (last == itr1) return false;
    itr1 = last;
    --itr1;
    itr1 = k;
    --itr2;
    while (first != itr1) {
      if (*--itr1 < *itr2) {
        Iterator j = k;
        while (!(*itr1 < *j)) ++j;
        std::iter_swap(itr1, j);
        ++itr1;
        ++j;
        itr2 = k;
        std::rotate(itr1, j, last);
        while (last != j) {
          ++j;
          ++itr2;
        }
        std::rotate(k, itr2, last);
        return true;
      }
    }
    std::rotate(first, k, last);
    return false;
  }
}

#endif

// lib/util.hpp
#ifndef UTIL_HPP
#define UTIL_HPP


typedef std::int_fast64_t i64;
typedef std::uint_fast64_t u64;
typedef std::int_fast32_t i32;
typedef std::uint_fast32_t u32;

namespace tools {
  template <typename T>
  void read(std::vector<T>& vector, const typename std::vector<T>::size_type size) {
    vector.reserve(size);
    std::copy_n(std::istream_iterator<T>(std::cin), size, std::back_inserter(vector));
  }

  template <typename T, std::size_t N>
  void read(std::array<T, N>& array) {
    std::copy_n(std::istream_iterator<T>(std::cin), N, array.begin());
  }
}

#endif

// lib/union_find.hpp
#ifndef UNION_FIND_HPP
#define UNION_FIND_HPP


/*
usage:

tools::union_find<std::int_fast64_t> uf(10);
uf.unite(1, 3);
uf.is_same(1, 3);
*/

namespace tools {
  template <typename T>
  class union_find {
  private:
    std::vector<T> parents;
    std::vector<T> sizes;
    T component_count;

    T root(const T x) {
      return this->parents[x] == x ? x : (this->parents[x] = this->root(this->parents[x]));
    }

  public:
    union_find(const T n) :
      parents(n),
      sizes(n, 1),
      component_count(n) {
      for (T i = 0; i < n; ++i) {
        parents[i] = i;
      }
    }

    bool is_same(const T x, const T y) {
      return this->root(x) == this->root(y);
    }

    void unite(T x, T y) {
      x = this->root(x);
      y = this->root(y);
      if (x == y) return;

      if (this->sizes[x] < this->sizes[y]) std::swap(x, y);
      this->parents[y] = x;
      this->sizes[x] += this->sizes[y];
      --this->component_count;
    }

    T size() const {
      return this->component_count;
    }

    T size(const T x) {
      return this->sizes[this->root(x)];
    }
  };
}

#endif

// main.cpp

class point {
public:
  i64 x, y;

  point() = default;
  point(const i64 x, const i64 y) :
    x(x), y(y) {
  }

  point operator-(const point& other) const {
    return point(this->x - other.x, this->y - other.y);
  }
  bool operator==(const point& other) const {
    return this->x == other.x && this->y == other.y;
  }
};

namespace std {
  std::istream& operator>>(std::istream& is, point& self) {
    return is >> self.x >> self.y;
  }
}

int main() {
  i64 N;
  std::cin >> N;
  std::vector<point> points;
  tools::read(points, N);

  std::vector<i64> iota(N);
  std::iota(iota.begin(), iota.end(), 0);
  i64 answer = std::numeric_limits<i64>::max();
  do {
    const point diff = points[iota[1]] - points[iota[0]];
    tools::union_find<i64> uf(N);
    std::vector<i64> iota2(N);
    std::iota(iota2.begin(), iota2.end(), 0);
    do {
      if (points[iota2[1]] - points[iota2[0]] == diff || points[iota2[0]] - points[iota2[1]] == diff) {
        uf.unite(iota2[0], iota2[1]);
      }
    } while (tools::next_combination(iota2.begin(), iota2.begin() + 2, iota2.end()));

    answer = std::min(answer, uf.size());
  } while (tools::next_combination(iota.begin(), iota.begin() + 2, iota.end()));

  std::cout << answer << std::endl;
  return 0;
}

Measured memory_bytes: 256