#include int main() { int z, n, i; int tx, ty, tm; int x, y, m; z = 1; while (scanf (" %d", &n) && n >= 0) { tx = ty = tm = 0; for (i = 0; i < n; i++) { scanf (" %d %d %d", &x, &y, &m); tx += x*m; ty += y*m; tm += m; } printf("Case %d: %.2lf %.2lf\n", z++, (double)tx/(double)tm, (double)ty/(double)tm); } return 0; }