// Author: Adrian Kuegel
// Date: September 8th, 2010
// Algorithm: binary search
// Complexity: O(n log k)

#include <stdio.h>
#include <assert.h>
#include <math.h>
#include <algorithm>
using namespace std;

#define MAXN 10000

double x[MAXN], y[MAXN];

int main() {
	int tc;
	scanf("%d", &tc);
	assert(tc >= 1 && tc <= 100);
	while(tc--) {
		double a, b, v, f;
		scanf("%lf %lf %lf %lf", &a, &b, &v, &f);
		assert(a >= 0.1 && a <= 100);
		assert(b >= 0.1 && b <= 100);
		assert(v >= 10 && v <= 200);
		assert(f >= 0 && f <= 50);
		int n;
		scanf("%d", &n);
		assert(n >= 1 && n <= MAXN);
		for (int i=0; i<n; ++i) {
			scanf("%lf %lf", &x[i], &y[i]);
			assert(x[i] >= 1 && x[i] <= 1000 && y[i] >= -1000 && y[i] <= 1000);
		}
		double lo = 0, up = v;
		double time_needed = 1e18;
		for (int iter=0; iter<50; ++iter) {
			double mid = (lo + up) / 2;
			double f_left = f;
			double time = 0;
			for (int i=0; i<n; ++i) {
				double vt = mid;
				double c = a * vt + b * (y[i] / x[i]);
				if (c <= 0) {
					vt = min(-b * (y[i] / x[i]) / a, v);
					assert(vt >= mid);
				}
				else
					f_left -= c * hypot(x[i], y[i]) / 1000;
				if (vt == 0.0) {
					f_left = -1;
					break;
				}
				time += hypot(x[i], y[i])/vt;
			}
			if (f_left >= 0) {
				time_needed = time;
				lo = mid;
			}
			else
				up = mid;
		}
		if (time_needed < 1e17)
			printf("%.10lf\n", time_needed/1000);
		else
			puts("IMPOSSIBLE");
	}
	return 0;
}
