#include #include struct kde { int x, y; } *pole; double stred_x, stred_y, k_x, k_y, z; int n; int ex(float cx, float cy, int g) { int e = 0; for (int h = g; h < n; h++) if ((g != h) && (pole[h].x == cx) && (pole[h].y == cy)) { e = 1; break; } return e; } int main() { int ide; scanf("%d", &n); while (n) { ide = 1; pole = new kde[n]; stred_x = stred_y = 0; for (int j = 0; j < n; j++) { scanf("%d%d", &pole[j].x, &pole[j].y); stred_x += pole[j].x; stred_y += pole[j].y; } stred_x /= n; stred_y /= n; for (int k = 0; k < n; k++) { k_x = 2 * stred_x - pole[k].x; k_y = 2 * stred_y - pole[k].y; if (((pole[k].x != stred_x) || (pole[k].y != stred_y)) && !ex(k_x, k_y, k)) { ide = 0; break; } } stred_x = stred_x * 10; z = modf(stred_x, &stred_x); z *= 10; if (z >= 5) stred_x += 1; stred_x /= 10; stred_y = stred_y * 10; modf(stred_y, &stred_y); z *= 10; stred_y /= 10; if (z >= 5) stred_y += 1; if ((stred_x < 0) && (stred_x > -0.05)) stred_x *= -1; if ((stred_y < 0) && (stred_y > -0.05)) stred_y *= -1; if (ide) printf("V.I.P. should stay at (%.1f,%.1f).\n", stred_x, stred_y); else printf("This is dangerous situation!\n"); delete [] pole; scanf("%d", &n); } return 0; }