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

import java.io.*;
import java.util.*;

public class adrian_noprecalc {
	public static void main(String [] args) throws Exception {
		Locale.setDefault(Locale.US);
		BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
		int tc = Integer.parseInt(in.readLine());
		while(tc-- > 0) {
			StringTokenizer strtok = new StringTokenizer(in.readLine());
			double a = Double.parseDouble(strtok.nextToken());
			double b = Double.parseDouble(strtok.nextToken());
			double v = Double.parseDouble(strtok.nextToken());
			double f = Double.parseDouble(strtok.nextToken());
			int n = Integer.parseInt(in.readLine());
			double [] x = new double[n];
			double [] y = new double[n];
			for (int i=0; i<n; ++i) {
				strtok = new StringTokenizer(in.readLine());
				x[i] = Double.parseDouble(strtok.nextToken());
				y[i] = Double.parseDouble(strtok.nextToken());
			}
			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 = Math.min(-b * (y[i] / x[i]) / a, v);
					}
					else
						f_left -= c * Math.hypot(x[i], y[i]) / 1000;
					if (vt == 0.0) {
						f_left = -1;
						break;
					}
					time += Math.hypot(x[i], y[i])/vt;
				}
				if (f_left >= 0) {
					time_needed = time;
					lo = mid;
				}
				else
					up = mid;
			}
			if (time_needed < 1e17)
				System.out.printf("%.10f\n", time_needed/1000);
			else
				System.out.println("IMPOSSIBLE");
		}
	}
}
