include

include

include

include

include

include

include

using namespace std;

long double eps = 1e-15;
int n;
long double u, t, tmp, c[51], p[51], q[51];

struct node {
long double w, v;
} a[51];

long double calc(long double k) {
tmp = 0; long double will = 0;
for (int i = 1; i <= n; ++i) {
long double R = (k - a[i].v) * (k - a[i].v);
long double t = R * a[i].w * a[i].w / (R * u * u - u * u * u * u);
t = sqrt(t);
will += t;
c[i] = t;
tmp += sqrt(u * u * t * t - a[i].w * a[i].w)+ a[i].v * t;
}
return will;
}

int main() {
// freopen("river.in", "r", stdin);
// freopen("river.out", "w", stdout);
scanf("%d", &n); double dist = 0;
cin >> u >> t;
long double Max = 0;
for (int i = 1; i <= n; i++) cin >> a[i].w >> a[i].v, dist += a[i].w, Max = max(Max, a[i].v);
long double limit = 0;
for (int i = 1; i <= n; i++) limit += a[i].w / u;
if (limit > t) {
printf("-1\n");
return 0;
}
else {
long double Left = Max + u, Right = 1e12, Mid = (Left + Right) / 2.0;
for (int j = 1; j <= 500; j++, Mid = (Left + Right) / 2.0) {
if (calc(Mid) >= t) Left = Mid;
else Right = Mid;
}
calc(Left);

    printf("%.3f\n", (double)sqrt(tmp * tmp + dist * dist));
    printf("%.3f", (double)c[1]);
    for (int i = 2; i <= n; i++) printf(" %.3f", (double)c[i]);

    printf("\n");
}

}