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
import sys
# import heapq, collections

sys.setrecursionlimit(10**7)
inf = 10**20
eps = 1.0 / 10**15
mod = 10**9+7

def LI(): return [int(x) for x in sys.stdin.readline().split()]
def LI_(): return [int(x)-1 for x in sys.stdin.readline().split()]
def LF(): return [float(x) for x in sys.stdin.readline().split()]
def LS(): return sys.stdin.readline().split()
def I(): return int(sys.stdin.readline())
def F(): return float(sys.stdin.readline())
def S(): return input()

def solve(d):

    a = d
    b = 0
    cnt = 0
    LIMIT = 10**(-6)
    i = 0

    while cnt < 1000 and (abs((a+b)-(a*b)) > LIMIT or abs((a+b)-d) > LIMIT):
        diff = 10**i
        cnt += 1
        while cnt < 1000 and a>=0 and b>=0 and (a+b) > a*b:
            cnt += 1
            diff = 10**i
            a -= diff
            b += diff
        else:
            a += diff
            b -= diff
        i -= 1
        
    if (abs((a+b)-(a*b)) > LIMIT or abs((a+b)-d) > LIMIT):
        return "N"

    return "Y " + str(a) + " " + str(b)

def main():
    for _ in range(I()):
        print(solve(I()))

main()
