// O(r log r)

#include <stdio.h>
#include <stdlib.h>
#include <math.h>

#define MIN(a,b) ((a) < (b) ? (a) : (b))
#define MAXR 10000

double s[MAXR];
double len[MAXR];
int downhill[MAXR];

int compare_slope(const void *_a, const void *_b) {
	int a = *(int *)_a;
	int b = *(int *)_b;
	if(s[a] < s[b])
		return 1;
	if(s[b] < s[a])
		return -1;
	return 0;
}

void testcase() {
	double alpha, beta, vmax, f, x, y, lensum, v, ret;
	int i, r, ndown;
	scanf("%lf %lf %lf %lf\n", &alpha, &beta, &vmax, &f);
	scanf("%d\n", &r);
	for(i = 0; i < r; i++) {
		scanf("%lf %lf\n", &x, &y);
		s[i] = (double)y / (double)x;
		len[i] = sqrt(x*x + y*y) / 1000.0;
	}
	ndown = 0;
	lensum = 0;
	for(i = 0; i < r; i++) {
		if(s[i] < 0) {
			downhill[ndown++] = i;
		} else {
			f -= beta * s[i] * len[i];
			lensum += len[i];
		}
	}
	if(f < 0 || (f == 0 && ndown < r)) {
		printf("IMPOSSIBLE\n");
		return;
	}
	if(ndown > 1)
		qsort(downhill, ndown, sizeof(int), compare_slope);
	v = MIN(vmax, f / (lensum * alpha));
	for(i = 0; i < ndown; i++) {
		if(v < MIN(vmax, -beta * s[downhill[i]] / alpha)) break;
		f -= beta * s[downhill[i]] * len[downhill[i]];
		lensum += len[downhill[i]];
		v = MIN(vmax, f / (lensum * alpha));
	}
	ret = lensum / v;
	for(; i < ndown; i++)
		ret += len[downhill[i]] / MIN(vmax, -beta * s[downhill[i]] / alpha);
	printf("%.10lf\n", ret);
}

int main() {
	int t;
	scanf("%d\n", &t);
	while(t--) testcase();
	return 0;
}
