import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.HashSet;

public class Vision {

    private static final int BLANK = 0;
    private static final int OPTIONAL = 1;
    private static final int HIT = 2;

    public static void main(String[] args) throws IOException {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        int N = Integer.parseInt(br.readLine());
        int[] STAR_X = new int[N];
        int[] STAR_Y = new int[N];

        for (int i = 0; i < N; i++) {
            String parts[] = br.readLine().split(" ");
            STAR_X[i] = Integer.parseInt(parts[0]);
            STAR_Y[i] = Integer.parseInt(parts[1]);
        }

        int map[][] = new int[N][N];
        HashSet<Integer> vectors = new HashSet<>();

        for (int i = 0; i < N; i++) {
            for (int j = i+1; j < N; j++) {
                int DX = STAR_X[i] - STAR_X[j];
                int DY = STAR_Y[i] - STAR_Y[j];

                map[i][j] = +DX + +DY * 10000;
                map[j][i] = -DX + -DY * 10000;

                vectors.add(map[i][j]);
                vectors.add(map[j][i]);
            }
        }
        int count = 0;
        for (Integer vector: vectors) {
            int ok = 0;
            int[] state = new int[N];
            for (int i = 0; i < N; i++) {
                for (int j = 0; j < N; j++) {
                    if (i == j) continue;

                    if (map[i][j] == vector) {
                        if (state[i] == BLANK) {
                            ok++;
                        }
                        state[i] = HIT;
                        if (state[j] == BLANK) {
                            ok++;
                            state[j] = OPTIONAL;
                        }
                    }
                }
            }
            if (ok == N) {
                count++;
            }
        }
        System.out.println(count);
    }
}

