Problem: Try guessing the statement from this picture: 

<image>

You are given a non-negative integer d. You have to find two non-negative real numbers a and b such that a + b = d and a ⋅ b = d.

Input

The first line contains t (1 ≤ t ≤ 10^3) — the number of test cases.

Each test case contains one integer d (0 ≤ d ≤ 10^3).

Output

For each test print one line.

If there is an answer for the i-th test, print "Y", and then the numbers a and b.

If there is no answer for the i-th test, print "N".

Your answer will be considered correct if |(a + b) - a ⋅ b| ≤ 10^{-6} and |(a + b) - d| ≤ 10^{-6}.

Example

Input


7
69
0
1
4
5
999
1000


Output


Y 67.985071301 1.014928699
Y 0.000000000 0.000000000
N
Y 2.000000000 2.000000000
Y 3.618033989 1.381966011
Y 997.998996990 1.001003010
Y 998.998997995 1.001002005

Solution (in JAVA):

Solution:
import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.InputMismatchException;
import java.io.IOException;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 *
 * @author real
 */
public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        InputReader in = new InputReader(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        TaskC solver = new TaskC();
        int testCount = Integer.parseInt(in.next());
        for (int i = 1; i <= testCount; i++)
            solver.solve(i, in, out);
        out.close();
    }

    static class TaskC {
        public void solve(int testNumber, InputReader in, PrintWriter out) {
            int d = in.nextInt();
            int disc = d * d - 4 * d;
            if (disc < 0) {
                out.println("N");
                return;
            }

            double val = Math.sqrt(disc);
            double val2 = -val;
            double a1 = d + val;
            a1 /= 2;
            double a2 = d + val2;
            a2 /= 2;
            if (a1 >= 0) {
                double b = d - a1;
                if (b >= 0) {
                    out.print("Y" + " ");
                    out.printf("%.10f", a1);
                    out.print(" ");
                    out.printf("%.10f", b);
                    out.println();
                    return;
                }
                if (Math.abs(b) < 1e-8) {
                    b = Math.abs(b);
                    out.print("Y" + " ");
                    out.printf("%.10f", a1);
                    out.print(" ");
                    out.printf("%.10f", b);
                    out.println();
                    return;
                }

            } else {
                if (Math.abs(a1) < 1e-7) {
                    double b = d - a1;
                    if (b >= 0) {
                        out.print("Y" + " ");
                        out.printf("%.10f", a1);
                        out.print(" ");
                        out.printf("%.10f", b);
                        out.println();
                        return;
                    }
                    if (Math.abs(b) < 1e-8) {
                        b = Math.abs(b);
                        out.print("Y" + " ");
                        out.printf("%.10f", a1);
                        out.print(" ");
                        out.printf("%.10f", b);
                        out.println();
                        return;
                    }
                }

            }
            if (a2 >= 0) {
                double b = d - a2;
                if (b >= 0) {
                    out.print("Y" + " ");
                    out.printf("%.10f", a2);
                    out.print(" ");
                    out.printf("%.10f", b);
                    out.println();
                    return;
                }
                if (Math.abs(b) < 1e-8) {
                    b = Math.abs(b);
                    out.print("Y" + " ");
                    out.printf("%.10f", a2);
                    out.print(" ");
                    out.printf("%.10f", b);
                    out.println();
                    return;
                }

            } else {
                if (Math.abs(a2) < 1e-8) {
                    double b = d - a2;
                    if (b >= 0) {
                        out.print("Y" + " ");
                        out.printf("%.10f", a2);
                        out.print(" ");
                        out.printf("%.10f", b);
                        out.println();
                        return;
                    }
                    if (Math.abs(b) < 1e-8) {
                        b = Math.abs(b);
                        out.print("Y" + " ");
                        out.printf("%.10f", a2);
                        out.print(" ");
                        out.printf("%.10f", b);
                        out.println();
                        return;
                    }
                }
            }
            out.print("N");
            out.println();
        }

    }

    static class InputReader {
        private final InputStream stream;
        private final byte[] buf = new byte[8192];
        private int curChar;
        private int snumChars;

        public InputReader(InputStream st) {
            this.stream = st;
        }

        public int read() {
            //*-*------clare------
//remeber while comparing 2 non primitive data type not to use ==
//remember Arrays.sort for primitive data has worst time case complexity of 0(n^2) bcoz it uses quick sort
//again silly mistakes ,yr kb tk krta rhega ye mistakes
//try to write simple codes ,break it into simple things
            // for test cases make sure println(); ;)
//knowledge>rating
        /*
        public class Main
        implements Runnable{
    public static void main(String[] args) {
        new Thread(null,new Main(),"Main",1<<26).start();

    }
    public void run() {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        InputReader in = new InputReader(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        TaskC solver = new TaskC();//chenge the name of task
        solver.solve(1, in, out);
        out.close();
    }
         */

            if (snumChars == -1)
                throw new InputMismatchException();
            if (curChar >= snumChars) {
                curChar = 0;
                try {
                    snumChars = stream.read(buf);
                } catch (IOException e) {
                    throw new InputMismatchException();
                }
                if (snumChars <= 0)
                    return -1;
            }
            return buf[curChar++];
        }

        public int nextInt() {
            int c = read();
            while (isSpaceChar(c)) {
                c = read();
            }
            int sgn = 1;
            if (c == '-') {
                sgn = -1;
                c = read();
            }
            int res = 0;
            do {
                res *= 10;
                res += c - '0';
                c = read();
            } while (!isSpaceChar(c));
            return res * sgn;
        }

        public String readString() {
            int c = read();
            while (isSpaceChar(c)) {
                c = read();
            }
            StringBuilder res = new StringBuilder();
            do {
                res.appendCodePoint(c);
                c = read();
            } while (!isSpaceChar(c));
            return res.toString();
        }

        public String next() {
            String str = readString();
            return str;
        }

        public boolean isSpaceChar(int c) {
            return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
        }

    }
}