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:
// Working program with FastReader 
import java.io.BufferedReader; 
import java.io.IOException; 
import java.io.InputStreamReader; 
import java.util.*;
public class g
{ 
    static class FastReader 
    { 
        BufferedReader br; 
        StringTokenizer st; 

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

        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; 
        } 
    } 
    public static int findIndex(long arr[], long t) 
    { 

        // if array is Null 
        if (arr == null) { 
            return -1; 
        } 

        // find length of array 
        int len = arr.length; 
        int i = 0; 

        // traverse in the array 
        while (i < len) { 

            // if the i-th element is t 
            // then return the index 
            if (arr[i] == t) { 
                return i; 
            } 
            else { 
                i = i + 1; 
            } 
        } 
        return -1; 
    }

    static long gcd(long a, long b)
    {
        if (a == 0)
            return b; 
        return gcd(b % a, a); 
    }    

    static long lcm(long a,long b)
    {
        return (a / gcd(a, b)) * b;
    }

    static int [] rev(int i,int p,int a[])
    {

        for(int j=i;j<=p;j++)
        {
            int temp=a[j];
            a[j]=a[p];
            a[p]=temp;
            p--;
        }
        return a;
    }

    static void sort(int[] a) {
        ArrayList<Integer> l = new ArrayList<>();
        for (int i : a)
            l.add(i);
        Collections.sort(l);
        for (int i = 0; i < a.length; i++)
            a[i] = l.get(i);
    }

    static void sortRange(int[] a,int x,int y) {
        ArrayList<Integer> l = new ArrayList<>();
        for (int i =x;i<y;i++)
            l.add(a[i]);
        Collections.sort(l);
        int j=0;
        for (int i = x; i <y; i++)
            a[i] = l.get(j++);
    }

    static double pow(double p,double tt)
    {
        double ii,q,r;
        q=1;
        r=p;
        while(tt>1)
        {
            for(ii=1;2*ii<=tt;ii*=2)
                p*=p;
            tt-=ii;
            q*=p;
            p=r;
        }
        if(tt==1)
            q*=r;
        return q;
    }

    static int LowerBound(int a[], int x) { // x is the target value or key
        int l=-1,r=a.length;
        while(l+1<r) {
            int m=(l+r)>>>1;
            if(a[m]>=x) r=m;
            else l=m;
        }
        return r;
    }

    static int UpperBound(int a[], int x) {// x is the key or target value
        int l=-1,r=a.length;
        while(l+1<r) {
            int m=(l+r)>>>1;
            if(a[m]<=x) l=m;
            else r=m;
        }
        return l+1;
    }

    static void ruffleSort(long[] a) {
        int n=a.length;
        Random r=new Random();
        for (int i=0; i<a.length; i++) {
            long oi=r.nextInt(n), temp=a[i];
            a[i]=a[(int)oi];
            a[(int)oi]=temp;
        }
        Arrays.sort(a);
    }

    static void ruffleSort(int[] a) {
        int n=a.length;
        Random r=new Random();
        for (int i=0; i<a.length; i++) {
            int oi=r.nextInt(n), temp=a[i];
            a[i]=a[oi];
            a[oi]=temp;
        }
        Arrays.sort(a);
    }

    public static void main(String[] args) 
    {//try
        //{
        FastReader d=new FastReader();
        int t,i,j,c,z,k,n,l;
        int mod = (int) 1e9 + 7;

        int Inf=Integer.MAX_VALUE;
        int negInf=Integer.MIN_VALUE;
        t=d.nextInt();
        //t=1;
        String s;
        //char ch,ch1,ch2,ch3;
        long ans;
        while(t-->0)
        {
            int x,y;
            z=c=0;
            int z1=0;
            ans=0l;
            n=d.nextInt();
            double a,b,a1;
            if((long)n*n>=(long)4*n)
            {
                a=((double)n+Math.sqrt(n*n-4*n))/2d;
                if(a!=0)
                b=(double)n/a;
                else
                b=0;
                System.out.println("Y "+a+" "+b);
            }
            else
            {
                System.out.println("N");
            }
            //Set <Integer> ss=new HashSet<>();

        }
        /*

        }catch(Exception e) {
        System.out.println(0);
        }*/

    } 
}