/*--------------------------------------------------------------*/
/* ACM ICPC 2007-2008                                           */
/* Northeastern European Regional Contest                       */
/* St Petersburg - Barnaul - Tashkent - Batumi, November 28, 200*/
/*--------------------------------------------------------------*/
/* Problem D. Diver                                             */
/*--------------------------------------------------------------*/
/* Solution                                                     */
/*                                                              */
/* Author                Pavel Mavrin                           */
/*--------------------------------------------------------------*/
 
import java.util.*;
import java.io.File;
import java.io.PrintWriter;
import java.io.FileNotFoundException;

/**
 * diver_pm to be documented :TODO:.
 *
 * @author Pavel Mavrin
 * @version $Id$
 */
public class diver_pm implements Runnable {

    private static final double EPS = 1e-9;

    private void solve() throws FileNotFoundException {
        Scanner in = new Scanner(new File("input.txt"));
        PrintWriter out = new PrintWriter("output.txt");

        double d = in.nextInt();
        double va = in.nextInt();
        int n = in.nextInt();
        double r = in.nextInt();
        double w = in.nextInt();
        double vs = in.nextInt();

        double[] ds = new double[n];
        double[] ws = new double[n];
        int[] f = new int[n];
        for (int i = 0; i < n; i++) {
            ds[i] = in.nextInt();
            ws[i] = in.nextInt();
            f[i] = in.nextInt();
            if (ws[i] == w) f[i] = 1;
        }

        int m = 0;
        for (int i = 0; i < n; i++) {
            boolean ok = true;
            for (int j = 0; j < i; j++) if (ds[i] == ds[j] && ws[i] == ws[j] && f[i] == f[j]) ok = false;
            if (ok) {
                ds[m] = ds[i];
                ws[m] = ws[i];
                f[m] = f[i];
                m++;
            }
        }
        n = m;

        // Make shark speed equals 1.
        va /= vs;

        // Calculate size of base rectangles
        double width;
        double height;
        {
            double a = Math.atan(va);
            width = 2 * r * Math.sin(a);
            height = 2 * r * Math.cos(a);
        }

        //Make base rectangles
        double[] ll = new double[n];
        double[] rr = new double[n];
        double[] bb = new double[n];
        double[] tt = new double[n];
        double[] xx = new double[n];
        double[] yy = new double[n];

        for (int i = 0; i < n; i++) {
            double y = d - ds[i];
            double x = f[i] == -1 ? ws[i] : 2 * w - ws[i];

            xx[i] = x;
            yy[i] = y;

            bb[i] = y - height / 2;
            tt[i] = y + height / 2;
            ll[i] = x - width / 2;
            rr[i] = x + width / 2;

            splitAndAdd(ll[i], rr[i], bb[i], tt[i], 2 * w);
        }

        // Make special rectangles in intersections

        for (int i = 0; i < n; i++) {
            for (int j = 0; j < n; j++) {
                if (Math.hypot(xx[i] - xx[j], yy[i] - yy[j]) < 2 * r - EPS) {
                    if (tt[i] < bb[j] + EPS) {
                        splitAndAdd(Math.max(ll[i], ll[j]), Math.min(rr[i], rr[j]), bb[i], tt[j], 2 * w);
                    }
                }
            }
        }

        for (int i = 0; i < n; i++) {
            if (yy[i] < r - EPS) {
                splitAndAdd(ll[i], rr[i], -1, tt[i], 2 * w);
            }
        }

        addRect(0, 2 * w, -1, 0);

        double[] a = new double[2 * n];
        double[] b = new double[2 * n];

        int k = 1;
        a[0] = 0;
        b[0] = 0;

        List<Border> current = new ArrayList<Border>();

        Collections.sort(borders);

        System.out.println("0 1 0 0");

        double time = 0;
        double mx = -1;
        while (true) {
            if (k == 0 || b[k - 1] < mx + EPS) {
                out.println("IMPOSSIBLE");
                break;
            }
            mx = b[k - 1];
            if (b[k - 1] > d + r) {
                out.println((time - ((b[k - 1] - d) / va)) / vs);
                break;
            }
            double x = 0;
            for (Border border : borders) {
                if (k == 0) {
                    break;
                }
                time += (border.x - x);

                // Extend segments
                for (int j = 0; j < k; j++) {
                    double max = -1e100;
                    double min = 1e100;
                    for (Border brd : current) {
                        if (brd.t < a[j] + EPS && brd.t > max) {
                            max = brd.t;
                        }
                        if (brd.b > b[j] - EPS && brd.b < min) {
                            min = brd.b;
                        }
                    }
                    a[j] = Math.max(max, a[j] - (border.x - x) * va);
                    b[j] = Math.min(min, b[j] + (border.x - x) * va);
                }

                // Join segments
                int kk = 0;
                for (int j = 1; j < k; j++) {
                    if (a[j] < b[kk] + EPS) {
                        b[kk] = Math.max(b[kk], b[j]);
                    } else {
                        kk++;
                        a[kk] = a[j];
                        b[kk] = b[j];
                    }
                }
                k = kk + 1;

                if (border.left) {
                    // Install border
                    current.add(border);
                    kk = 0;
                    for (int j = 0; j < k; j++) {
                        if (a[j] > border.b + EPS && b[j] < border.t - EPS) {
                            // Eaten by border
                            kk++;
                            kk--;
                        } else if (a[j] < border.b + EPS && b[j] > border.t + EPS) {
                            // Divided by border
                            for (int t = k; t > j; t--) {
                                a[t] = a[t - 1];
                                b[t] = b[t - 1];
                            }
                            k++;
                            b[j] = border.b;
                            a[j + 1] = border.t;
                            a[kk] = a[j];
                            b[kk] = b[j];
                            kk++;
                        } else {
                            if (a[j] > border.b + EPS && a[j] < border.t - EPS) {
                                a[j] = border.t;
                            }
                            if (b[j] > border.b + EPS && b[j] < border.t - EPS) {
                                b[j] = border.b;
                            }
                            a[kk] = a[j];
                            b[kk] = b[j];
                            kk++;
                        }
                    }
                    k = kk;
                } else {
                    // Remove border
                    for (int j = 0; j < current.size(); j++) {
                        Border brd = current.get(j);
                        if (equal(brd.b, border.b) && equal(brd.t, border.t)) {
                            current.remove(j);
                            break;
                        }
                    }
                }
                x = border.x;
                System.out.println(border.x);
                System.out.println(k);
                for (int i = 0; i < k; i++) {
                    System.out.print(a[i] + " " + b[i] + " ");
                }
                System.out.println();
            }
        }
        in.close();
        out.close();
    }

    private void splitAndAdd(double ll, double rr, double bb, double tt, double length) {
        if (ll < 0) {
            addRect(0, rr, bb, tt);
            addRect(length + ll, length, bb, tt);
        } else if (rr > length) {
            addRect(ll, length, bb, tt);
            addRect(0, rr - length, bb, tt);
        } else {
            addRect(ll, rr, bb, tt);
        }
    }

    private boolean equal(double a, double b) {
        return Math.abs(a - b) < EPS;
    }

    List<Border> borders = new ArrayList<Border>();

    private void addRect(double l, double r, double b, double t) {
        borders.add(new Border(l, b, t, true));
        borders.add(new Border(r, b, t, false));
    }

    class Border implements Comparable<Border> {

        final double x, b, t;
        final boolean left;

        public Border(double x, double b, double t, boolean left) {
            this.x = x;
            this.b = b;
            this.t = t;
            this.left = left;
        }

        public int compareTo(Border that) {
            return Double.compare(x, that.x);
        }
    }

    public void run() {
        try {
            solve();
        } catch (Exception e) {
            e.printStackTrace();
            System.exit(1);
        }
    }

    public static void main(String[] args) {
        Locale.setDefault(Locale.US);
        new diver_pm().run();
    }

}
