import java.util.Scanner;
public class Main2 {
public static void main(String[] args) {
Scanner in = new Scanner(System.in);
while (in.hasNext()) {
long start=System.currentTimeMillis(); //获取开始时间
int n = in.nextInt();
int[][] a = new int[n][4];
for (int i = 0; i < n; i++) {
a[i][0] = in.nextInt();
a[i][1] = in.nextInt();
a[i][2] = in.nextInt();
a[i][3] = in.nextInt();
}
Position[] bPos = new Position[n];
double max = Double.MAX_VALUE;
double time = 0.00;
//time控制到 (t-1, t+1)
for (int t = 0; t < 10; t++) {
//所有点当前位置
for (int i = 0; i < n; i++) {
double x = a[i][0];
double y = a[i][1];
double vx = a[i][2];
double vy = a[i][3];
bPos[i] = getPosition(x, y, vx, vy, t);
}
//所有点距离最远的
double length = getMaxLength(bPos);
if (length < max) {
max = length;
time = t;
}
}
//time控制到 (t-0.1, t+0.1)
for (double t = time - 1.0; t < time + 1.0;) {
//所有点当前位置
for (int i = 0; i < n; i++) {
double x = a[i][0];
double y = a[i][1];
double vx = a[i][2];
double vy = a[i][3];
bPos[i] = getPosition(x, y, vx, vy, t);
}
//所有点距离最远的
double length = getMaxLength(bPos);
if (length < max) {
max = length;
time = t;
}
t += 0.1;
}
//找到精确time
for (double t = time - 0.1; t < time + 0.1;) {
//所有点当前位置
for (int i = 0; i < n; i++) {
double x = a[i][0];
double y = a[i][1];
double vx = a[i][2];
double vy = a[i][3];
bPos[i] = getPosition(x, y, vx, vy, t);
}
//所有点距离最远的
double length = getMaxLength(bPos);
if (length < max) {
max = length;
time = t;
}
t += 0.01;
}
System.out.println(String.format("%.2f", time) + " " + String.format("%.2f", Math.sqrt(max)));
//要测试的程序或方法
long end=System.currentTimeMillis(); //获取结束时间
System.out.println("程序运行时间: "+(end-start)+"ms");
}
}
static class Position {
double x;
double y;
public Position(double x, double y) {
this.x = x;
this.y = y;
}
}
static Position getPosition(double x, double y, double vx, double vy, double t) {
double posX = x + t * vx;
double posY = y + t * vy;
Position position = new Position(posX, posY);
return position;
}
static double getLength(Position pos1, Position pos2) {
double x = pos1.x - pos2.x;
double y = pos1.y - pos2.y;
return x * x + y * y;
}
static double getMaxLength(Position[] positions) {
double max = 0.00;
for (int i = 0; i < positions.length - 1; i++) {
for (int j = i; j < positions.length; j++) {
double length = getLength(positions[i], positions[j]);
if (length > max) {
max = length;
}
}
}
return max;
}
}