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.*;
import java.util.*;


/**
 * @authod Rashedul Hasan Rijul
 */
public class Solution {


    public static void main(String args[]) throws FileNotFoundException {

        // for testing in local
        // FastReader fastReader = FastReader.getFileReader("in.txt");

        FastReader fastReader = FastReader.getDefaultReader();

        int test = fastReader.nextInt();

        while ((test--) > 0) {

            int d = fastReader.nextInt();

            printAnswer(d);
        }


    }

    private static void printAnswer(int d) {

        if (d == 4) {
            System.out.println("Y " + String.format("%.10f", 2.0) + " " + String.format("%.10f", 2.0));
            return;
        }

        double dd = d;

        double lo = 0, hi = d, mid = 0;

        int turn = 10000;

        while ((turn--) > 0) {

            mid = lo + hi;
            mid /= 2.0;

            double value = (mid * mid) - (mid * dd) + dd;

            if (Math.abs(value) < (1e-8)) {
                break;
            }

            if (value < 0) {
                lo = mid;
            } else {
                hi = mid;
            }

        }

        double a = mid;
        double b = dd - a;

        double check1 = a * b;
        double check2 = a + b;

        if (Math.abs(check1 - dd) > (1e-8) || Math.abs(check2 - dd) > (1e-8)) {
            System.out.println("N");
            return;
        }

        System.out.println("Y " + String.format("%.10f", a) + " " + String.format("%.10f", b));
    }


    static class FastReader {
        BufferedReader br;
        StringTokenizer st;

        public FastReader() {
            br = new BufferedReader(new
                    InputStreamReader(System.in));
        }

        public static FastReader getFileReader(String fileName) throws FileNotFoundException {
            return new FastReader(new InputStreamReader(new FileInputStream(new File("in.txt"))));
        }

        public static FastReader getDefaultReader() throws FileNotFoundException {
            return new FastReader();
        }

        public FastReader(InputStreamReader inputStreamReader) {
            br = new BufferedReader(inputStreamReader);
        }

        String next() {
            while (st == null || !st.hasMoreElements()) {
                try {
                    st = new StringTokenizer(br.readLine());
                } catch (IOException e) {
                    e.printStackTrace();
                }
            }
            return st.nextToken();
        }

        int nextInt() {
            return Integer.parseInt(next());
        }

        long nextLong() {
            return Long.parseLong(next());
        }

        double nextDouble() {
            return Double.parseDouble(next());
        }

        String nextLine() {
            String str = "";
            try {
                str = br.readLine();
            } catch (IOException e) {
                e.printStackTrace();
            }
            return str;
        }
    }

}