#include using namespace std; bool pole[2005][2005]; int main() { int N; int res = 0; scanf("%d", &N); int x[N], y[N]; for (int i = 0; i < N; i++) { scanf("%d %d", &x[i], &y[i]); pole[x[i] + 1000][y[i] + 1000] = 1; } for (int i = 1; i < N; i++) { bool breakAll = false; int dx = x[0] - x[i]; int dy = y[0] - y[i]; if (dx == 0 && dy == 0) continue; for (int j = 0; j < N; j++) { int xx = x[j] + dx + 1000; int yy = y[j] + dy + 1000; if (xx >= 0 && xx < 2005 && yy >= 0 && yy < 2005) if (pole[xx][yy]) continue; xx = x[j] - dx + 1000; yy = y[j] - dy + 1000; if (xx >= 0 && xx < 2005 && yy >= 0 && yy < 2005) if (pole[xx][yy]) continue; //printf("%d\n", j);///////////////////// breakAll = true; break; } //printf("%d\n", i);///////////////////////// if (breakAll) continue; //over ci posun je ok res += 2; } for (int i = 0; i < N; i++) pole[x[i] + 1000][y[i] + 1000] = 0; printf("%d\n", res); return 0; }