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
/*input
7
69
0
1
4
5
999
1000
*/
import java.util.List;
import java.util.ArrayList;
import java.io.OutputStream;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.StringTokenizer;
import java.io.IOException;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.InputStream;
import java.util.Stack;
/*      
 * @uthor masterbios
 */
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);
        TaskAA solver = new TaskAA();
        solver.solve(1, in, out);
        out.close();
    }

    static class TaskAA {
    	final long mul = (long)1e6;
        public void solve(int testNumber, InputReader in, PrintWriter out) {
			int n = in.nextInt();
			A:
			while(n-- > 0){
				double x = in.nextDouble();
				if(x < 4.000000 && x > 0.000000000){
					out.println("N");
				} else if(x == 0.00000000){
					out.println( "Y 0.00000000000 0.00000000000");
				} else {
					double d = Math.sqrt(x * x - 4 * x);
					double res1 = (d + x) / 2.0;
					double res2 = (d - x) / 2.0;
					out.printf("Y %.9f %.9f %n",res1, x - res1);
					// out.printf("%.9f%n",res1);
				}
			}	
        }
    }

    static class InputReader {
        public BufferedReader reader;
        public StringTokenizer tokenizer;
 
        public InputReader(InputStream stream) {
            reader = new BufferedReader(new InputStreamReader(stream), 32768);
            tokenizer = null;
        }
 
        public String next() {
            while (tokenizer == null || !tokenizer.hasMoreElements()) {
                try {
                    tokenizer = new StringTokenizer(reader.readLine());
                } catch (IOException e) {
                    throw new RuntimeException(e);
                }
            }
            return tokenizer.nextToken();
        }
        
        public String nextLine(){
            String s ="";
            try{
                s = reader.readLine();
            }
            catch(IOException e){
                throw new RuntimeException(e);
            }
            return s;
        }
        public int nextInt() {
            return Integer.parseInt(next());
        }
        public long nextLong() {
            return Long.parseLong(next());
        }
        public Double nextDouble() {
            return Double.parseDouble(next());
        }
        public char nextChar() {
            return next().charAt(0);
        }
        public float nextFloat(){
            return Float.parseFloat(next());
        }
        
    }
}     