Try guessing the statement from this picture:  $3$ 

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 \cdot b = d$.


-----Input-----

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

Each test case contains one integer $d$ $(0 \le d \le 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 \cdot b| \le 10^{-6}$ and $|(a + b) - d| \le 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

Difficulty: EASY
Tags: Sorting

Mathematics
Skill types: Sorting

Starter code:

Solutions:
import math
t = int(input())
for i in range(t):
	d = int(input())
	try:
		a = (d + math.sqrt(d ** 2 - 4 * d)) / 2
		b = (d - math.sqrt(d ** 2 - 4 * d)) / 2
		print('Y ', a, b)
	except:
		print('N')


import sys
tc = int(sys.stdin.readline())
for _ in range(tc):
	d = int(sys.stdin.readline())
	if d ** 2 - 4 * d < 0:
		print('N')
	else:
		b1 = (d + (d ** 2 - 4 * d) ** 0.5) / 2
		a1 = d - b1
		b2 = (d - (d ** 2 - 4 * d) ** 0.5) / 2
		a2 = d - b2
		if a1 >= 0 and b1 >= 0:
			print('Y %.9f %.9f' % (a1, b1))
		elif a2 >= 0 and b2 >= 0:
			print('Y %.9f %.9f' % (a2, b2))
		else:
			print('N')


def solve():
	d = int(input())
	if 0 < d < 4:
		return ['N']
	else:
		x = abs(d + (d ** 2 - 4 * d) ** 0.5) / 2
		return ['Y', x, d - x]
t = int(input())
for case in range(t):
	print(*solve())


def solve():
	results = []
	for _ in range(int(input())):
		n = int(input())
		if n < 0:
			results.append('N')
			continue
		x = n ** 2 - 4 * n
		if x < 0:
			results.append('N')
			continue
		n1 = (n + x ** 0.5) / 2
		n2 = (n - x ** 0.5) / 2
		if n2 > n1:
			(n1, n2) = (n2, n1)
		results.append('Y ' + str(n1) + ' ' + str(n2))
	print('\n'.join((k for k in results)))
solve()


n = int(input())

def y(x, d):
	return -x * x + d * x - d

def dydx(x, d):
	return -2 * x + d
for i in range(0, n):
	d = int(input())
	if d * d / 4 - d < 0:
		print('N')
	else:
		xn = 0
		while abs(xn * (d - xn) - d) > 10 ** (-6) and xn <= d:
			xn = xn - y(xn, d) / dydx(xn, d)
		print('Y', xn, d - xn)


T = int(input())
for _ in range(T):
	d = int(input())
	disc = d ** 2 - 4 * 1 * d
	if disc < 0:
		print('N')
		continue
	else:
		sol = (d + disc ** 0.5) / 2
		print('Y', sol, d - sol)


from math import sqrt

def find_ab(d):
	D = d ** 2 - 4 * d
	if D < 0:
		return None
	sD = sqrt(D)
	a1 = (d + sD) / 2
	b1 = d - a1
	a2 = (d - sD) / 2
	b2 = d - a2
	if b1 >= 0 and a1 >= 0:
		return (a1, b1)
	elif b2 >= 0 and a2 >= 0:
		return (a2, b2)
	return None
N = int(input())
answers = []
for _ in range(N):
	d = int(input())
	answer = find_ab(d)
	if answer:
		(a, b) = answer
		answers.append('Y ' + str(a) + ' ' + str(b))
	else:
		answers.append('N')
for i in range(N):
	print(answers[i])


def solution():
	N = int(input())
	for i in range(N):
		d = int(input())
		if d ** 2 - 4 * d < 0:
			print('N')
		else:
			x = (d ** 2 - 4 * d) ** 0.5
			if x < 0:
				x = -x
			print('Y ' + str((d + x) / 2) + ' ' + str((d - x) / 2))
solution()


import math
t = int(input())
D = [int(input()) for i in range(t)]
for d in D:
	if 1 <= d <= 3:
		print('N')
	elif d == 0:
		print('Y', 0, 0)
	else:
		MIN = math.sqrt(d)
		MAX = d
		while True:
			a = (MIN + MAX) / 2
			b = d - a
			if abs(a + b - a * b) <= 10 ** (-9):
				break
			if a + b > a * b:
				MAX = a
			else:
				MIN = a
		print('Y', a, b)


t = int(input())
while t > 0:
	n = float(input())
	if n ** 2 - 4 * n < 0:
		print('N')
	elif n == 0:
		print('Y', 0.0, 0.0)
	else:
		b = (n + (n ** 2 - 4 * n) ** 0.5) / 2
		(a, v) = (float, float)
		print('Y', b, b / (b - 1))
	t -= 1


q = int(input())
for _ in range(q):
	n = float(input())
	d = n ** 2 - 4 * n
	if d >= 0:
		x1 = (-n - d ** 0.5) / 2
		x2 = (-n + d ** 0.5) / 2
		print('Y ', '%.9f' % abs(x1), ' ', '%.9f' % abs(x2))
	else:
		print('N')


import math
for ix in range(int(input())):
	d = int(input())
	k = d * d - 4 * d
	if k >= 0:
		x = (d + math.sqrt(k)) / 2
		y = (d - math.sqrt(k)) / 2
	if x < 0 or y < 0 or k < 0:
		print('N')
	else:
		print('Y', x, y)


from math import sqrt
for _ in range(int(input())):
	a = -1
	b = int(input())
	if b == 0:
		print('Y 0 0')
		continue
	c = b * -1
	s = b ** 2 - 4 * a * c
	if s < 0:
		print('N')
		continue
	n1 = (-b - sqrt(s)) / 2 * a
	n2 = (-b + sqrt(s)) / 2 * a
	print('Y ', n1, ' ', n2)


from math import sqrt
for _ in range(int(input())):
	d = int(input())
	if d * d - 4 * d < 0:
		print('N')
	elif d - sqrt(d * d - 4 * d) > d:
		print('N')
	else:
		print('Y', (d + sqrt(d * d - 4 * d)) / 2, (d - sqrt(d * d - 4 * d)) / 2)


import math
t = int(input())
while t != 0:
	t = t - 1
	d = int(input())
	des = d * d - 4 * d
	if des < 0:
		print('N')
	else:
		a = (d + math.sqrt(des)) / 2.0
		b = d - a
		print('Y', a, b)


def bin_search(first, last, y):
	if first > last:
		print('N')
		return
	i = (first + last) // 2
	b = (y - i) / 10 ** 12
	a = i / 10 ** 12
	if abs(a * b * 10 ** 12 - y) <= 100000:
		print('Y', round(b, 15), round(a, 15))
		return
	if a * b > y / 10 ** 12:
		bin_search(first, i - 1, y)
	else:
		bin_search(i + 1, last, y)
n = int(input())
for x in range(n):
	d = int(input())
	d = d * 10 ** 12
	if d == 0:
		print('Y 0 0')
	else:
		bin_search(1, d, d)


n = int(input())
for i in range(n):
	t = int(input())
	d = t ** 2 - 4 * t
	a = (t + d ** 0.5) / 2
	b = (t - d ** 0.5) / 2
	if t == 0:
		print('Y', 0, 0)
	elif t == 1 or t == 2 or t == 3:
		print('N')
	else:
		print('Y', a, b)


def readint():
	return int(input())

def readline():
	return [int(c) for c in input().split()]

def main():
	t = readint()
	tests = []
	for i in range(t):
		tests.append(readint())
	for e in tests:
		delta = e * (e - 4)
		if delta >= 0:
			a = (e + delta ** 0.5) / 2
			b = (e - delta ** 0.5) / 2
			print('Y', a, b)
		else:
			print('N')
main()


import math
n = int(input())
for i in range(n):
	d = int(input())
	try:
		print('Y', '%.9f' % float(d - (d - math.sqrt(d * d - 4 * d)) / 2), end=' ')
		print('%.9f' % float((d - math.sqrt(d * d - 4 * d)) / 2))
	except:
		print('N')


import math
t = int(input())
for i in range(t):
	n = int(input())
	if n >= 4 or n <= 0:
		q = math.sqrt(n * (n - 4))
		a = (n + q) / 2
		b = (n - q) / 2
		print(f'Y {a} {b}')
	else:
		print('N')


from typing import Dict, List, Tuple

def input_lst() -> List[int]:
	return [int(x) for x in input().split()]

def print_out(res: List[int]):
	print(' '.join([str(x) for x in res]))

def main():
	(n,) = (int(x) for x in input().split())
	for _ in range(n):
		d = int(input())
		discr = d ** 2 - 4 * d
		if discr < 0:
			print('N')
			continue
		x = (d + discr ** 0.5) / 2
		print('Y {:0.9f} {:0.9f}'.format(x, d - x))
main()


import math
t = int(input())
while t:
	t -= 1
	d = float(input())
	flag = False
	x = d * d
	if x - 4 * d >= 0:
		flag = True
		diff = math.sqrt(x - 4 * d)
	else:
		print('N')
		continue
	summ = d
	a = (summ + diff) / 2
	b = d - a
	print('Y {0:.9f} '.format(a), end=' ')
	print('{0:.9f}'.format(b))


import math
for T in range(int(input())):
	d = int(input())
	if d * d < 4 * d:
		print('N')
	else:
		b = (d + math.sqrt(d * d - 4 * d)) / 2
		a = d - b
		print('Y', end=' ')
		print('%.9f %.9f' % (a, b))


import math
t = int(input())
for i in range(t):
	d = int(input())
	if d >= 1 and d <= 3:
		print('N')
	else:
		a = (d + math.sqrt((d - 4) * d)) / 2
		b = (d - math.sqrt((d - 4) * d)) / 2
		print('Y', a, b)


def bin_search(number):
	left_bound = 0
	right_bound = number
	middle = right_bound + left_bound / 2
	while abs(number - middle * (number - middle)) >= 1e-06:
		middle = (right_bound + left_bound) / 2
		if middle * (number - middle) > number:
			right_bound = middle
		else:
			left_bound = middle
	return (middle, number - middle)
amount = int(input())
for i in range(amount):
	number = int(input())
	if number < 4 and number > 0:
		print('N')
	else:
		(first, second) = bin_search(number)
		if abs(first + second - first * second) <= 1e-05 and abs(first + second - number) <= 1e-05:
			print('Y', first, second)
		else:
			print('difference')


def main():
	EPS = 10 ** (-10)
	t = int(input())
	nums = list()
	for i in range(t):
		nums.append(int(input()))
	for el in nums:
		if el > 0 and el < 4:
			print('N')
		elif el == 4:
			print('Y 2.000000000 2.000000000')
		else:
			left = 0
			right = el
			while right - left > EPS:
				mid = (left + right) / 2
				mult = mid * (el - mid)
				sum = mid + (el - mid)
				if mult <= el:
					left = mid
				if mult > el:
					right = mid
			print('Y ' + str(format(el - right, '.9f') + ' ' + str(format(right, '.9f'))))
main()


def read():
	return int(input())

def main():
	t = read()
	for _ in range(t):
		d = read()
		_d = d * d - 4 * d
		if _d < 0:
			print('N')
			continue
		_d **= 0.5
		b = (d - _d) / 2
		a = d - b
		if min(a, b) >= 0:
			print('Y', a, b)
main()


from math import sqrt

def resolve(d):
	if d == 0:
		return (0, 0)
	if d < 4 and d > 0:
		return (None, None)
	else:
		a = (d + sqrt(d ** 2 - 4 * d)) / 2
		b = (d - sqrt(d ** 2 - 4 * d)) / 2
	return (a, b)
n = int(input())
for i in range(0, n, 1):
	d = int(input())
	(a, b) = resolve(d)
	if a == None or b == None:
		print('N')
	else:
		print('Y', a, b)


import math
t = int(input())

def helper(x):
	return x * x - 4 * x
for _ in range(t):
	d = int(input())
	delta = helper(d)
	if delta < 0:
		print('N')
	else:
		line = ['Y']
		a = (d - math.sqrt(delta)) / 2
		b = d - a
		line.append(str(a))
		line.append(str(b))
		print(' '.join(line))


from math import sqrt
n = int(input())

def solve(x):
	(a, b) = (0, 0)
	D = (-x) ** 2 - 4 * x
	if D < 0:
		print('N')
		return
	b1 = (x - sqrt(D)) / 2
	b2 = (x + sqrt(D)) / 2
	print('Y', b2, b1)
for i in range(n):
	x = int(input())
	solve(x)


for _ in range(int(input())):
	d = int(input())
	if d ** 2 - 4 * d < 0:
		print('N')
	else:
		print('Y', (d + (d ** 2 - 4 * d) ** 0.5) / 2, (d - (d ** 2 - 4 * d) ** 0.5) / 2)


t = int(input())
(a, b) = (0, 0)
ans = []
temp = ''
for i in range(t):
	d = float(input())
	if d * d - 4 * d < 0:
		ans.append('N')
	else:
		b = (d + (d * d - 4 * d) ** 0.5) / 2
		a = d - b
		temp = 'Y ' + str(b) + ' ' + str(a)
		ans.append(temp)
for i in range(t):
	print(ans[i])


import math
n = int(input())
for i in range(n):
	d = int(input())
	if d != 1 and d != 2 and (d != 3):
		print('Y', end=' ')
		print(d - (d - math.sqrt(d ** 2 - 4 * d)) / 2, end=' ')
		print((d - math.sqrt(d ** 2 - 4 * d)) / 2)
	else:
		print('N')


import math
t = int(input())
d = []
for _ in range(t):
	d.append(int(input()))
for i in d:
	delta = i * i - 4 * i
	if delta < 0:
		print('N')
		continue
	x1 = (i - math.sqrt(delta)) / 2
	x2 = (i + math.sqrt(delta)) / 2
	print('Y', x1, x2)


n = int(input())
ans = [0, -1, -1, -1, 2, 1.381966011]
for i in range(6, 1001):
	r = ans[i - 1]
	l = r - 0.2
	while i - (i - l) * l > 1e-08:
		tm = (r + l) / 2
		if (i - tm) * tm > i:
			r = tm
		else:
			l = tm
	ans.append(l)
for i in range(n):
	t = int(input())
	if ans[t] == -1:
		print('N')
	else:
		print('Y', t - ans[t], ans[t])


import math
a = []
for i in range(int(input())):
	a.append(int(input()))
for i in a:
	s = i * i - i * 4
	if s < 0:
		print('N')
	else:
		n = round((i * 1 + math.sqrt(s)) / 2, 9)
		m = round((i * 1 - math.sqrt(s)) / 2, 9)
		ln = len(str(n).split('.')[1])
		lm = len(str(m).split('.')[1])
		print('Y', str(n) + '0' * (9 - ln), str(m) + '0' * (9 - lm))


from functools import reduce
import os
import sys
from math import *
from collections import *
from fractions import *
from bisect import *
from heapq import *
from io import BytesIO, IOBase
input = lambda : sys.stdin.readline().rstrip('\r\n')

def value():
	return tuple(map(int, input().split()))

def arr():
	return [int(i) for i in input().split()]

def sarr():
	return [i for i in input().split()]
t = int(input())
while t:
	t -= 1
	n = int(input())
	if n * n < 4 * n:
		print('N')
	else:
		a = (n + sqrt(n * n - 4 * n)) / 2
		b = n - a
		print('Y', a, b)


import math
n = int(input())
for i in range(n):
	d = float(input())
	s = d
	sqr = d * d - 4 * d
	if sqr < 0:
		print('N')
		continue
	ss = math.sqrt(sqr)
	a = (s + ss) / 2
	b = (s - ss) / 2
	if a >= 0.0 and b >= 0.0:
		print('Y ' + str(a) + ' ' + str(b))
	else:
		print('N')


for _ in range(int(input())):
	n = int(input())
	if n < 4:
		print('Y 0 0' if n == 0 else 'N')
	else:
		d = (n + n ** 0.5) / 2
		interval = (n - d) / 2
		while abs(d + n / d - n) > 10 ** (-6):
			if d + n / d > n:
				(d, interval) = (d - interval, interval / 2)
			else:
				(d, interval) = (d + interval, interval / 2)
		print('Y', d, n / d)


from math import sqrt
t = int(input())
for i in range(t):
	d = int(input())
	if d ** 2 - 4 * d < 0:
		print('N')
	else:
		b = (d + sqrt(d ** 2 - 4 * d)) / 2
		print('Y', d - b, b)


import math
n = int(input())
for i in range(n):
	s = int(input())
	if math.pow(s, 2) >= 4 * s:
		a = (s + math.sqrt(math.pow(s, 2) - 4 * s)) / 2
		b = (s - math.sqrt(math.pow(s, 2) - 4 * s)) / 2
		print('Y', a, b)
	else:
		print('N')


for i in range(int(input())):
	d = int(input())
	s = d ** 2 - 4 * d
	if s < 0 or d - s ** 0.5 < 0:
		print('N')
	else:
		print('Y', end=' ')
		print((d + s ** 0.5) / 2, (d - s ** 0.5) / 2)


import math
t = int(input())
for i in range(t):
	d = int(input())
	(a, b, c) = (1, -d, d)
	if a:
		if b * b - 4 * a * c >= 0:
			A1 = (-b + math.sqrt(b * b - 4 * a * c)) / 2 / a
			B1 = d - A1
			A2 = (-b + math.sqrt(b * b - 4 * a * c)) / 2 / a
			B2 = d - A2
			if A1 >= 0 and B1 >= 0:
				print('Y', A1, B1)
			elif A2 >= 0 and B2 >= 0:
				print('Y', A2, B2)
			else:
				print('N')
		else:
			print('N')


t = int(input())
for i in range(t):
	d = int(input())
	try:
		a1 = (d + (d ** 2 - 4 * d) ** 0.5) / 2
		a2 = (d - (d ** 2 - 4 * d) ** 0.5) / 2
		b1 = d - a1
		b2 = d - a2
		if b1 >= 0:
			print('Y', a1, b1)
		elif b2 >= 0:
			print('Y', a2, b2)
		else:
			print('N')
	except:
		print('N')


def test():
	n = int(input())
	delta = n ** 2 - 4 * n
	if delta < 0:
		print('N')
	else:
		x = (n + delta ** (1 / 2)) / 2
		print(f'Y {x} {n - x}')
tc = int(input())
for t in range(tc):
	test()


import math
t = int(input())
L = []
for i in range(0, t):
	L.append(int(input()))
A = []
for i in range(0, t):
	d = L[i]
	if d < 4:
		if d == 0:
			print('Y', 0, 0)
		else:
			print('N')
	else:
		print('Y', (d + math.sqrt(d ** 2 - 4 * d)) / 2, (d - math.sqrt(d ** 2 - 4 * d)) / 2)


t = int(input())
eps = 1e-10
for case in range(t):
	d = int(input())
	if d == 1 or d == 2 or d == 3:
		print('N')
		continue
	r = d
	l = 0
	while l + eps < r:
		n = (r + l) / 2
		if n * (d - n) < d:
			l = n
		else:
			r = n
	print('Y', d - l, l)


import math

def roota(n, d):
	m = math.sqrt(d)
	return (n + m) / 2

def rootb(n, d):
	m = math.sqrt(d)
	return (n - m) / 2
t = int(input())
for _ in range(t):
	n = int(input())
	d = n * n - 4 * n
	if d < 0:
		print('N')
	else:
		a = round(roota(n, d), 9)
		b = round(rootb(n, d), 9)
		print('Y ' + str(a) + ' ' + str(b))


from decimal import *
getcontext().prec = 20
t = int(input())

def p(a, d):
	if a >= d:
		return False
	b = d - a
	return d / a <= b
for _ in range(t):
	d = int(input())
	low = Decimal(0)
	high = Decimal(d)
	while True:
		if high - low <= 1e-11:
			break
		mid = low + (high - low) / 2
		if p(mid, d):
			low = mid
		else:
			high = mid
	if low == 0 and d - low != 0:
		print('N')
	else:
		print('Y {:.12} {:.12}'.format(low, d - low))


from math import sqrt
for _ in range(int(input())):
	d = int(input())
	if d ** 2 < 4 * d:
		print('N')
	else:
		a = (-d + sqrt(d ** 2 - 4 * d)) / 2
		a_ = d - a
		b = (-d - sqrt(d ** 2 - 4 * d)) / 2
		b_ = d - b
		print('Y ' + str(abs(a)) + ' ' + str(abs(b)))


from math import sqrt
t = int(input())
for i in range(t):
	num = int(input())
	delta = num ** 2 - 4 * num
	if delta < 0:
		print('N')
	else:
		a = (num + sqrt(delta)) / 2
		b = num - a
		print(f'Y {a:.9f} {b:.9f}')


length = int(input())
inputs = []
for i in range(0, length):
	inputs.append(int(input()))
for i in range(0, length):
	if inputs[i] < 4 and inputs[i] > 0:
		print('N')
	else:
		d = inputs[i]
		a = (d + pow(d * d - 4 * d, 1 / 2)) / 2
		b = (d - pow(d * d - 4 * d, 1 / 2)) / 2
		print('Y', a, b)


from math import sqrt
n = int(input())
for i in range(n):
	d = int(input())
	D = d ** 2 - 4 * d
	if D >= 0:
		D = sqrt(D)
		a = (d + D) / 2
		b = (d - D) / 2
		print('Y', end=' ')
		print('{0:.9f}'.format(a), end=' ')
		print('{0:.9f}'.format(b), end=' ')
	else:
		print('N')


for i in range(0, int(input())):
	d = int(input())
	if d == 1 or d == 2 or d == 3:
		print('N')
	else:
		n = (d ** 2 - 4 * d) ** 0.5
		r = (d - 2 + n) / 2
		print('Y', end=' ')
		print(r + 1, 1 + 1 / r)


import math
t = int(input())
for i in range(t):
	n = int(input())
	if n == 1 or n == 2 or n == 3:
		print('N')
		continue
	b = n - 4
	c = 4 - n
	d = b ** 2 - 4 * c
	s = (-b + math.sqrt(d)) / 2
	print('Y', n - 2 + s, 2 - s)


import sys
input = sys.stdin.buffer.readline
from math import *
t = int(input())
while t:
	t -= 1
	d = int(input())
	if d * d - 4 * d < 0:
		print('N')
	else:
		a1 = (d + sqrt(d * (d - 4))) / 2
		a2 = (d - sqrt(d * (d - 4))) / 2
		a = max(a1, a2)
		print('Y', a, d - a)


from decimal import *
a = int(input())
b = []
for i in range(a):
	b.append(int(input()))
for i in b:
	if i == 0:
		print('Y', i, i)
		continue
	x = 2.0
	y = 1.0
	z = 0
	while abs(x + (i - x) - x * (i - x)) >= pow(10, -6) and z < 20:
		while (i - x) * x > i:
			x = round(x - y, z)
		x = round(x + y, z)
		y /= 10
		z += 1
	if z < 20:
		print('Y', i - x, x)
	else:
		print('N')


import itertools as it
import functools
import operator
import collections
import math
import sys

def is_complex(d):
	return d ** 2 < 4 * d

def formula(d):
	a = (d + math.sqrt(d ** 2 - 4 * d)) / 2
	b = (d - math.sqrt(d ** 2 - 4 * d)) / 2
	return (a, b)

def solve(d):
	if is_complex(d):
		return 'N'
	(a, b) = formula(d)
	if b < 0:
		return 'N'
	return f'Y {a} {b}'

def main():
	n = int(input())
	xs = [int(input()) for _ in range(n)]
	for x in xs:
		result = solve(x)
		print(result)
main()


import math
t = int(input())

def is_good(a, b):
	if a < 0 or b < 0:
		return False
	return True
for T in range(t):
	d = int(input())
	D = d * d - 4 * d
	sqrtD = D ** 0.5
	if d == 0:
		print('Y 0.000000000 0.000000000')
		continue
	if d >= 4:
		x1 = 0.5 * (d - math.sqrt(d - 4) * math.sqrt(d))
		y1 = d - x1
		x2 = 0.5 * (d + math.sqrt(d - 4) * math.sqrt(d))
		y2 = d - x2
		if is_good(x1, y1):
			print('Y', x1, y1)
		elif is_good(x2, y2):
			print('Y', x2, y2)
		else:
			print('N')
	else:
		print('N')


def func(x):
	if x == 1 or x == 2 or x == 3:
		print('N')
	else:
		string = 'Y '
		front = x / 2
		back = (x ** 2 - 4 * x) ** 0.5 / 2
		string += str(front - back) + ' '
		string += str(front + back) + ' '
		print(string)

def main():
	count = int(input())
	for x in range(count):
		func(int(input()))
main()


t = int(input())
import math

def p(x):
	y = list(str(x))
	flag = 1
	z = y.index('.')
	for i in range(min(len(y), z + 1 + 9)):
		if min(len(y), z + 1 + 9) == z + 1 + 9:
			flag = 0
		print(y[i], end='')
	if flag == 1:
		printed = len(y) - z - 1
		for i in range(9 - printed):
			print('0', end='')
	print(end=' ')
for i in range(t):
	d = int(input())
	a1 = 0
	a2 = 0
	try:
		a1 = (d + math.sqrt(d ** 2 - 4 * d)) / 2
		a2 = (d - math.sqrt(d ** 2 - 4 * d)) / 2
	except:
		print('N')
		continue
	if d == 0:
		print('Y 0.000000000 0.000000000', end='')
	elif a1 > 0:
		print('Y', end=' ')
		p(a1)
		p(d / a1)
	elif a2 > 0:
		print('Y', end=' ')
		p(a2)
		p(d / a2)
	else:
		print('N')
	print()


import math
for i in range(int(input())):
	d = int(input())
	x = d ** 2 - 4 * d
	if x < 0:
		print('N')
	else:
		x = math.sqrt(x)
		b1 = (d + x) / 2
		b2 = (d - x) / 2
		if b2 == 1:
			a1 = b1 / (b1 - 1)
			print('Y', end=' ')
			print(a1, end=' ')
			print(b1)
		elif b1 == 1:
			a2 = b2 / (b2 - 1)
			print('Y', end=' ')
			print(a2, end=' ')
			print(b2)
		else:
			a1 = b1 / (b1 - 1)
			print('Y', end=' ')
			print(a1, end=' ')
			print(b1)


t = int(input())
for i in range(t):
	d = int(input())
	l = d - 2
	r = d + 2
	while True:
		b = (l + r) / 2
		if b == 0:
			a = d
		else:
			a = d / b
		if abs(a + b - d) <= 1e-06 and a * b - d <= 1e-06:
			print('Y', a, b)
			break
		else:
			if b == 1:
				print('N')
				break
			d_b = b ** 2 / (b - 1)
			if d_b > d:
				r = b
			else:
				l = b


PRECISION = 1e-08

def solve(n):
	(left, right, off) = (n / 2, n / 2, n / 2)
	pd = left * right
	while pd != n:
		off /= 2
		diff = abs(pd - n)
		if diff < PRECISION:
			if left < right:
				(left, right) = (right, left)
			return (left, right)
		if off <= PRECISION * 0.0001:
			return (-1, -1)
		if pd > n:
			left -= off
			right += off
		elif pd < n:
			left += off
			right -= off
		pd = left * right
	if left < right:
		(left, right) = (right, left)
	return (left, right)

def driver():
	tc = int(input())
	for _ in range(tc):
		(l, r) = solve(int(input()))
		if l != -1:
			print('Y', l, r)
		else:
			print('N')
driver()


for T in range(int(input())):
	x = int(input())
	d = x * (x - 4)
	if d < 0:
		print('N')
		continue
	a = (x + d ** 0.5) / 2
	print('Y', a, x - a)


def diff(a, b, d):
	return abs(a + b - d)
eps = 10 ** (-6)
for _ in range(int(input())):
	n = int(input())
	if n == 0:
		print('Y 0 0')
		continue
	if n == 1 or n == 2 or n == 3:
		print('N')
		continue
	(l, h, flag) = (0, n, False)
	while l <= h and h != 0:
		a = (l + h) / 2
		b = n - a
		if diff(a, b, a * b) <= eps and diff(a, b, n) <= eps:
			print('Y', a, b)
			flag = True
			break
		elif a * b < n:
			l = a
		else:
			h = a
	if not flag:
		print('N')


n = int(input())
eps = float(1e-07)
for i in range(n):
	x = float(input())
	l = 0.0
	r = x
	f = 0
	it = 0
	a = b = 0.0
	while it < 2000:
		it += 1
		mid = (l + r) / 2
		b = mid
		a = x - b
		if abs(a + b - a * b) <= eps:
			f = 1
			break
		if a + b <= a * b:
			r = mid
		else:
			l = mid
	if f == 0:
		print('N')
	else:
		print('Y', a, b)


for k in range(int(input())):
	d = int(input())
	if d - 4 < 0 and d != 0:
		print('N')
	else:
		a = ((d * (d - 4)) ** 0.5 + d) / 2
		b = d - a
		print('Y', a, b)


def solve(d):
	if d == 0:
		return 'Y 0.0 0.0'
	if d < 4:
		return 'N'
	left = 1
	right = d - 1
	a = (left + right) / 2
	b = d - a
	while not (abs(a + b - a * b) <= 1e-06 and abs(a + b - d) <= 1e-06):
		if a * b > d:
			left = a
		else:
			right = a
		a = (left + right) / 2
		b = d - a
	return 'Y ' + str(a) + ' ' + str(b)

def main():
	t = int(input())
	for _ in range(t):
		d = int(input())
		print(solve(d))
main()


from math import sqrt
for _ in range(int(input())):
	n = int(input())
	if n == 0:
		print('Y', 0, 0)
		continue
	det = n * n - 4 * n
	if det < 0:
		print('N')
		continue
	a = sqrt(det)
	a += n
	a /= 2
	b = n / a
	print('Y', a, b)


from collections import deque, Counter, OrderedDict
from heapq import nsmallest, nlargest
from math import ceil, floor, log, log2, sqrt, gcd, factorial

def binNumber(n, size=1):
	return bin(n)[2:].zfill(size)

def iar():
	return list(map(int, input().split()))

def ini():
	return int(input())

def isp():
	return map(int, input().split())

def sti():
	return str(input())
t = ini()
for _ in range(t):
	d = ini()
	if d * d - 4 * d < 0:
		print('N')
		continue
	x1 = (d + sqrt(d * d - 4 * d)) / 2
	x2 = (d - sqrt(d * d - 4 * d)) / 2
	if x1 < 0 and x2 < 0:
		print('N')
		continue
	print('Y', x1, x2)


import math as mt
t = int(input())
for _ in range(t):
	d = int(input())
	if d ** 2 >= 4 * d:
		x1 = (d + mt.sqrt(d ** 2 - 4 * d)) / 2
		x2 = (d - mt.sqrt(d ** 2 - 4 * d)) / 2
		if x1 >= 0 and d - x1 >= 0:
			print('Y', x1, d - x1)
		elif x2 >= 0 and d - x2 >= 0:
			print('Y', x2, d - x2)
		else:
			print('N')
	else:
		print('N')


def bin(n):
	n *= 1000000000
	left = 0
	right = n // 2
	a = n // 2
	n *= 1000000000
	while right - left > 1:
		middle = (right + left) // 2
		if (a - middle) * (a + middle) >= n:
			left = middle
		else:
			right = middle
	return [(a - left) / 1000000000, (a + left) / 1000000000]
t = int(input())
for i in range(t):
	n = int(input())
	if n == 1 or n == 2 or n == 3:
		print('N')
	else:
		print('Y', *bin(n))


t = int(input())
while t > 0:
	d = int(input())
	delta = d * d - 4 * d
	if delta < 0:
		print('N')
	else:
		a = (d + delta ** 0.5) / 2.0
		b = (d - delta ** 0.5) / 2.0
		print('Y ' + str(a) + ' ' + str(b))
	t -= 1


t = int(input())
for i in range(t):
	d = int(input())
	if 0 < d < 4:
		print('N')
	else:
		a = (d + (d * d - 4 * d) ** 0.5) / 2
		b = (d - (d * d - 4 * d) ** 0.5) / 2
		print('Y', a, b)


from math import *
for i in range(int(input())):
	d = int(input())
	D = d ** 2 - 4 * d
	if D >= 0:
		x1 = (d + sqrt(D)) / 2
		x2 = (d - sqrt(D)) / 2
		a1 = d - x1
		a2 = d - x2
		if a1 * x1 == d:
			print('Y', x1, a1)
		else:
			print('Y', x2, a2)
	else:
		print('N')


n = int(input())
for i in range(n):
	c = int(input())
	if c == 0:
		print('Y', 0.0, 0.0)
	elif c ** 2 - 4 * c < 0:
		print('N')
	else:
		b = (c + (c ** 2 - 4 * c) ** 0.5) / 2
		a = c / b
		print('Y', b, a)


for test in range(int(input())):
	d = int(input())
	delta = d ** 2 - 4 * d
	if delta < 0:
		print('N')
		continue
	else:
		x1 = (-d + delta ** 0.5) / -2
		x2 = (-d - delta ** 0.5) / -2
		x = max(x1, x2)
		if delta == 0:
			x = max(abs(x), d / 2)
		if x1 < 0 and x2 < 0:
			print('N')
		(x1, x2) = (x, d - x)
		print('Y', '%.9f %.9f' % (x1, x2))


def Solve(d):
	D = d * (d - 4)
	if D < 0:
		return 'N'
	else:
		x = (d - D ** 0.5) / 2
		return 'Y ' + str(x) + ' ' + str(d - x)
for _ in range(int(input())):
	print(Solve(int(input())))


from math import *
n = int(input())
for i in range(n):
	d = int(input())
	lala = d ** 2 - 4 * d
	if lala < 0:
		print('N')
		continue
	b = sqrt(d ** 2 - 4 * d)
	b += d
	b = b / 2
	a = d - b
	print('Y ' + str(a) + ' ' + str(b))


from math import *
t = int(input())
for _ in range(t):
	n = int(input())
	if n == 0:
		print('Y', 0, 0)
	elif 0 < n < 4:
		print('N')
	else:
		D = sqrt(n * n - 4 * n)
		print('Y', (n + D) / 2, (n - D) / 2)


from math import sqrt
for _ in range(int(input())):
	d = int(input())
	if d < 4 and d > 0:
		print('N')
		continue
	else:
		D = sqrt(d ** 2 - 4 * d)
		a = (d + D) / 2
		b = (d - D) / 2
		print('Y {} {}'.format(a, b))


import math
t = int(input())
for _ in range(t):
	d = int(input())
	z = d ** 2 - 4 * d
	if z >= 0:
		a = (d + math.sqrt(z)) / 2
		b = (d - math.sqrt(z)) / 2
		print('Y', a, b, sep=' ')
	else:
		print('N')


from math import sqrt
for i in range(int(input())):
	d = int(input())
	dis = d * d - 4 * d
	if dis >= 0 and d * d >= dis:
		a = (d - sqrt(dis)) / 2
		print('Y', a, d - a)
	else:
		print('N')


import math
t = int(input())
while t:
	d = int(input())
	disc = d * d - 4 * d
	if disc < 0:
		print('N')
	else:
		print('Y', (d - math.sqrt(disc)) / 2, (d + math.sqrt(disc)) / 2)
	t = t - 1


import collections, atexit, math, sys, bisect
sys.setrecursionlimit(1000000)

def getIntList():
	return list(map(int, input().split()))
try:
	import numpy

	def dprint(*args, **kwargs):
		print(*args, file=sys.stderr)
	dprint('debug mode')
except Exception:

	def dprint(*args, **kwargs):
		pass
inId = 0
outId = 0
if inId > 0:
	dprint('use input', inId)
	sys.stdin = open('input' + str(inId) + '.txt', 'r')
if outId > 0:
	dprint('use output', outId)
	sys.stdout = open('stdout' + str(outId) + '.txt', 'w')
	atexit.register(lambda : sys.stdout.close())
(N,) = getIntList()

def work(g):
	dd = g * g - 4 * g
	if dd < 0:
		print('N')
		return
	dd = dd ** 0.5
	s1 = g + dd
	s2 = g - dd
	s1 /= 2
	s2 /= 2
	print('Y', s1, s2)
	a = s1
	b = s2
	assert abs(a + b - a * b) <= 1e-06
	assert abs(a + b - g) <= 1e-06
for _ in range(N):
	g = int(input())
	work(g)


import math
for _ in range(int(input())):
	n = int(input())
	if pow(n, 2) - 4 * n >= 0:
		v = math.sqrt(pow(n, 2) - 4 * n)
		v += n
		v /= 2
		s = n - v
		print('Y', v, s, sep=' ')
	else:
		print('N')


import math
i = int(input())
for n in range(i):
	n = int(input())
	if n * n - 4 * n < 0:
		print('N')
		continue
	a = (n + math.sqrt(n * n - 4 * n)) * 0.5
	b = (n - math.sqrt(n * n - 4 * n)) * 0.5
	print('Y', a, b)


def find_pair(d):
	left = 0
	right = d
	a = 1
	b = 0
	eps = 1 / 10000000.0
	while abs(d / a - (d - a)) >= eps:
		a = (left + right) / 2
		if a == 0:
			break
		b = d / a
		if a + b + eps < d:
			left = a
		else:
			right = a
	if abs(a + b - a * b) <= eps and abs(a + b - d) <= eps:
		return (a, b)
	else:
		return (-1, -1)
test_count = int(input())
for _ in range(test_count):
	d = float(input())
	ans = find_pair(d)
	if ans[0] != -1:
		print('Y', ans[0], ans[1])
	else:
		print('N')


from math import *
t = int(input())
while t > 0:
	t = t - 1
	d = int(input())
	if d == 0:
		print('Y %.9f %.9f' % (0, 0))
	elif d * d < 4 * d:
		print('N')
	else:
		a = (d + sqrt(d * d - 4 * d)) / 2
		b = (d - sqrt(d * d - 4 * d)) / 2
		print('Y %.9f %.9f' % (a, b))


import math
for _ in range(int(input())):
	d = int(input())
	z = d * d - 4 * d
	if z < 0:
		print('N')
	else:
		zz = (d + math.sqrt(z)) / 2
		zzz = (d - math.sqrt(z)) / 2
		print('Y', zz, zzz)


from math import sqrt
for k in range(int(input())):
	d = int(input())
	if d * d - 4 * d < 0:
		print('N')
	else:
		print('Y', end=' ')
		print((d + sqrt(d * d - 4 * d)) / 2, d - (d + sqrt(d * d - 4 * d)) / 2, sep=' ')


import math
t = int(input())
d = []
for i in range(t):
	d += [int(input())]
for i in range(t):
	Det = d[i] * d[i] - 4 * d[i]
	if Det < 0:
		print('N')
	else:
		a = (d[i] - math.sqrt(Det)) / 2
		b = float(d[i] - a)
		print('Y %.9f %.9f' % (b, a))


t = int(input())
while t > 0:
	t -= 1
	d = int(input())
	if d ** 2 - 4 * d >= 0:
		b = (d - (d ** 2 - 4 * d) ** 0.5) / 2
		a = (d + (d ** 2 - 4 * d) ** 0.5) / 2
		print('Y', format(a, '.9f'), format(b, '.9f'))
	else:
		print('N')


for n in range(int(input())):
	d = int(input())
	if d == 1 or d == 3 or d == 2:
		print('N')
	else:
		a = (d * d - 4 * d) ** 0.5
		x = (d + a) / 2
		y = (d - a) / 2
		print('Y', x, y)


import math
for i in range(int(input())):
	d = int(input())
	x = d ** 2 - 4 * d
	if x < 0:
		print('N')
		continue
	else:
		x = math.sqrt(x)
		x1 = (-d + x) / -2
		x2 = (-d - x) / -2
		if x1 >= 0 or x2 >= 0:
			a = max(x1, x2)
		b = d - a
		print('Y {:.9f} {:.9f}'.format(abs(a), abs(b)))


import math
n = int(input())
for i in range(n):
	d = int(input())
	if d == 0:
		print('Y 0 0')
	elif d < 4:
		print('N')
	else:
		a = (d + math.sqrt(d * d - 4 * d)) / 2
		b = (d - math.sqrt(d * d - 4 * d)) / 2
		print('Y', a, b, end=' ')
		print()


from sys import stdin
max_val = int(10000000000000.0)
min_val = int(-10000000000000.0)

def read_int():
	return int(stdin.readline())

def read_ints():
	return [int(x) for x in stdin.readline().split()]

def read_str():
	return input()

def read_strs():
	return [x for x in stdin.readline().split()]
nb_test = read_int()
for _ in range(nb_test):
	d = read_int()
	a = d ** 2 - 4 * d
	if a >= 0:
		a1 = (d + a ** 0.5) / 2
		a2 = d - a1
		print('Y', a1, a2)
	else:
		print('N')


import configparser
import sys
input = sys.stdin.readline

def ceil_div(x, y):
	return -(-x // y)

def main():
	t = int(input())
	for i in range(t):
		d = int(input())
		if d == 0:
			print('Y 0 0')
		elif d < 4:
			print('N')
		else:
			low = 0.0
			high = d / 2
			for i in range(200):
				mid = (low + high) / 2
				if mid * d - mid ** 2 <= d:
					low = mid
				else:
					high = mid
			a = mid
			b = d - mid
			print('Y %.15f %.15f' % (a, b))
main()


from math import sqrt

def main():
	n = int(input())
	for i in range(n):
		num = int(input())
		if num ** 2 - 4 * num < 0:
			print('N')
			continue
		x = sqrt(num ** 2 - 4 * num)
		a = (num + x) / 2
		b = (num - x) / 2
		print('Y {} {}'.format(a, b))
	return
main()


from math import sqrt
n = int(input())
for i in range(n):
	lol = int(input())
	try:
		a = (lol - sqrt(lol ** 2 - 4 * lol)) / 2
		print('Y', lol - a, a)
	except:
		print('N')


import math
t = int(input())
for i in range(t):
	d = int(input())
	if d ** 2 >= 4 * d:
		print('Y', '{0:.9f}'.format(round((math.sqrt(d ** 2 - 4 * d) + d) / 2, 9)), '{0:.9f}'.format(round((-math.sqrt(d ** 2 - 4 * d) + d) / 2, 9)))
	else:
		print('N')


for _ in range(int(input())):
	d = int(input())
	g = d * d - 4 * d
	if g >= 0:
		f = float(d - g ** (1 / 2)) / 2
		k = float(d + g ** (1 / 2)) / 2
		print('Y', k, f)
	else:
		print('N')


from math import sqrt
n_tests = int(input())
d_list = []
for _ in range(n_tests):
	d_list.append(int(input()))
for d in d_list:
	if d ** 2 - 4 * d >= 0:
		a = (d + sqrt(d ** 2 - 4 * d)) / 2
		b = (d - sqrt(d ** 2 - 4 * d)) / 2
	else:
		print('N')
		continue
	if a >= 0 and b >= 0:
		print('Y', a, b)
	else:
		print('N')


from math import sqrt
for t in range(int(input())):
	d = int(input())
	if d < 4 and d > 0:
		print('N')
	else:
		n = sqrt(d * (d - 4))
		a = (d + n) / 2
		b = (d - n) / 2
		print('Y', a, b)


import sys
input = sys.stdin.readline
for _ in range(int(input())):
	d = int(input())
	if d ** 2 - 4 * d < 0:
		print('N')
		continue
	if d == 0:
		print('Y', 0, 0)
		continue
	b = (d + (d ** 2 - 4 * d) ** 0.5) / 2
	a = d / b
	if a < 0 or b < 0:
		print('N')
		continue
	print('Y', a, b)


from math import sqrt
T = int(input())
while T > 0:
	d = int(input())
	if d * (d - 4) < 0:
		print('N')
	else:
		v1 = (d + sqrt(d * d - 4 * d)) / 2
		v2 = (d - sqrt(d * d - 4 * d)) / 2
		if v1 < 0 or v2 < 0:
			print('N')
		else:
			print('Y', v1, v2)
	T = T - 1


import math
n = input()
n = int(n)
res = []
for i in range(n):
	d = input()
	d = int(d)
	try:
		a = (d + math.sqrt(pow(d, 2) - 4 * d)) / 2
		b = d - a
		res.append('Y ' + str(a) + ' ' + str(b))
	except:
		res.append('N')
for c in res:
	print(c)


def sqrt(n):
	low = 0
	high = 1000
	mid = 0
	for i in range(50):
		mid = (low + high) / 2
		sqr = mid * mid
		if sqr > n:
			high = mid
		elif sqr < n:
			low = mid
		else:
			return mid
	return mid
t = int(input())
for i in range(t):
	d = int(input())
	if 0 < d < 4:
		ans = 'N'
	else:
		c = d / 2
		s = sqrt(c * c - d)
		a = c + s
		b = c - s
		ans = f'Y {a} {b}'
	print(ans)


t = int(input())
while t > 0:
	t -= 1
	d = float(input())
	if d == 0:
		print('Y 0.000000 0.000000')
		continue
	(lo, hi) = (1.0, 2.0)
	for i in range(0, 205):
		md = (lo + hi) / 2.0
		if d - md >= d / md:
			hi = md
		else:
			lo = md
	if abs(d - lo - d / lo) > 1e-06:
		print('N')
	else:
		print('Y {:.10f}'.format(d - lo) + ' {:.10f}'.format(lo))


for i in range(int(input())):
	d = int(input())
	a = (d + (d ** 2 - 4 * d) ** 0.5) / 2
	b = (d - (d ** 2 - 4 * d) ** 0.5) / 2
	try:
		if a >= 0 and b >= 0:
			print('Y', a, b)
		else:
			print('N')
	except:
		print('N')


import sys
t = int(sys.stdin.readline())
for i in range(t):
	d = int(sys.stdin.readline())
	D = d ** 2 - 4 * d
	if D >= 0 and D ** (1 / 2.0) <= d:
		a = (d + D ** (1 / 2.0)) / 2
		if a > d:
			a = (d - D ** (1 / 2.0)) / 2
		b = d - a
		print('Y', a, b)
	else:
		print('N')


for nitish in range(int(input())):
	d = int(input())
	if d == 0:
		print('Y', 0, 0)
	elif d < 4:
		print('N')
	else:
		b = d * d * 1.0 - 4.0 * d
		b = b ** 0.5
		b = b + 1.0 * d
		b = b / 2
		a = d / b
		print('Y', a, b)


def ii():
	return int(input())

def mi():
	return map(int, input().split())

def li():
	return list(mi())
for t in range(ii()):
	d = ii()
	D = d * d - 4 * d
	if D < 0:
		print('N')
		continue
	ans = (d - D ** 0.5) / 2
	print('Y {:.9f} {:.9f}'.format(d - ans, ans))


import sys, math, bisect
from random import randint
inf = float('inf')
mod = 10 ** 9 + 7

def lcm(a, b):
	return int(a / math.gcd(a, b) * b)

def gcd(a, b):
	return int(math.gcd(a, b))

def tobinary(n):
	return bin(n)[2:]

def binarySearch(a, x):
	i = bisect.bisect_left(a, x)
	if i != len(a) and a[i] == x:
		return i
	else:
		return -1

def lowerBound(a, x):
	i = bisect.bisect_left(a, x)
	if i:
		return i - 1
	else:
		return -1

def upperBound(a, x):
	i = bisect.bisect_right(a, x)
	if i != len(a) + 1 and a[i - 1] == x:
		return i - 1
	else:
		return -1

def primesInRange(n):
	ans = []
	prime = [True for i in range(n + 1)]
	p = 2
	while p * p <= n:
		if prime[p] == True:
			for i in range(p * p, n + 1, p):
				prime[i] = False
		p += 1
	for p in range(2, n + 1):
		if prime[p]:
			ans.append(p)
	return ans

def primeFactors(n):
	factors = []
	while n % 2 == 0:
		factors.append(2)
		n = n // 2
	for i in range(3, int(math.sqrt(n)) + 1, 2):
		while n % i == 0:
			factors.append(i)
			n = n // i
	if n > 2:
		factors.append(n)
	return factors

def isPrime(n, k=5):
	if n < 2:
		return True
	for i in range(0, k):
		a = randint(1, n - 1)
		if pow(a, n - 1, n) != 1:
			return False
	return True
from collections import deque, defaultdict, Counter
import heapq, string
for _ in range(int(input())):
	d = int(input())
	if d == 0:
		print('Y', 0.0, 0.0)
	elif d < 4:
		print('N')
	else:
		D = math.sqrt(d * (d - 4.0))
		a = (d + D) / 2.0
		b = (d - D) / 2.0
		print('Y', a, b)


for _ in range(int(input())):
	d = int(input())
	(a, b) = (0.0, 0.0)
	if d == 0:
		print('Y', round(a, 8), round(b, 8))
	elif d == 1 or d == 3 or d == 2:
		print('N')
	else:
		b = (d + (d * d - 4 * d) ** 0.5) / 2
		a = d - b
		print('Y', round(a, 15), round(b, 15))


t = int(input())
for _ in range(t):
	d = int(input())
	if d == 0 or d >= 4:
		a = d / 2 + 1 / 2 * pow(d * d - 4 * d, 1 / 2)
		b = d - a
		print('Y', a, b)
	else:
		print('N')


t = eval(input())
while t:
	t -= 1
	d = eval(input())
	k = d * d - 4 * d
	if k < 0:
		print('N')
	else:
		print('Y', end=' ')
		a = k ** 0.5 + d
		a = a / 2
		b = d - a
		print('{:.9f} {:.9f}'.format(a, b))


from math import sqrt
t = int(input())

def solve(d):
	a = (d + sqrt(d * d - 4 * d)) / 2.0
	b = d - a
	return (a, b)
for x in range(t):
	d = int(input())
	if d == 1 or d == 2 or d == 3:
		print('N')
	elif d == 0:
		print('Y', '{0:.10f}'.format(0), '{0:.10f}'.format(0))
	else:
		(a, b) = solve(d)
		if b > a:
			(a, b) = (b, a)
		print('Y', '{0:.10f}'.format(a), '{0:.10f}'.format(b))


import math
t = int(input())
while t > 0:
	t = t - 1
	n = int(input())
	if n == 1 or n == 2 or n == 3:
		print('N')
	else:
		p = (n + math.sqrt(n ** 2 - 4 * n)) / 2
		q = (n - math.sqrt(n ** 2 - 4 * n)) / 2
		print('Y', p, q)


import math
t = int(input())
for i in range(t):
	k = float(input())
	r = k * k - 4 * k
	if k * k - 4 * k < 0:
		print('N')
	else:
		print('Y', end=' ')
		l = (k + math.sqrt(r)) / 2.0
		print('%.9f' % l, end=' ')
		print('%.9f' % (k - l))


def find(d):
	D = d ** 2 - 4 * d
	if D < 0:
		print('N')
		return
	a = d - D ** 0.5
	b = d + D ** 0.5
	print('Y', a / 2, b / 2)
	return
for _ in range(int(input())):
	find(int(input()))


import sys
import math
input = sys.stdin.readline
t = int(input())
for w in range(t):
	d = int(input())
	if d == 0:
		print('Y 0 0')
	elif d < 4:
		print('N')
	else:
		a = (d + math.sqrt(d * (d - 4))) / 2
		b = (d - math.sqrt(d * (d - 4))) / 2
		print('Y', a, b)


from math import *
t = int(input())
for l in range(t):
	d = int(input())
	if d < 4 and d != 0:
		print('N')
	else:
		b1 = (d + sqrt(d * d - 4 * d)) / 2
		b2 = (d - sqrt(d * d - 4 * d)) / 2
		if b1 > 0:
			print('Y', d / b1, b1)
		elif b2 > 0:
			print('Y', d / b2, b2)
		else:
			print('Y', 0, 0)


n = int(input())
a = [0 for i in range(n)]
for i in range(n):
	a[i] = int(input())
for i in range(n):
	d = a[i]
	if d ** 2 - 4 * d >= 0:
		print('Y ' + str((d + (d ** 2 - 4 * d) ** 0.5) / 2) + ' ' + str((d - (d ** 2 - 4 * d) ** 0.5) / 2))
	else:
		print('N')


n = int(input())
for i in range(n):
	a = int(input())
	if a == 1 or a == 2 or a == 3:
		print('N')
	else:
		D = (a ** 2 - 4 * a) ** 0.5
		x1 = (a + D) / 2
		x2 = (a - D) / 2
		print('Y', x1, x2)


q = int(input())
for i in range(q):
	d = int(input())
	if d >= 4 or d <= 0:
		D = (d ** 2 - 4 * d) ** 0.5 / 2
		print('Y', d / 2 + D, d / 2 - D)
	else:
		print('N')


import math
t = int(input())
a = []
for i in range(t):
	d = int(input())
	a.append(d)
for i in range(t):
	if a[i] == 0 or a[i] >= 4:
		p = a[i] + math.sqrt(a[i] * a[i] - 4 * a[i])
		p /= 2
		p1 = a[i] - math.sqrt(a[i] * a[i] - 4 * a[i])
		p1 /= 2
		if 2 * p == a[i]:
			print('Y', p, p)
		elif 2 * p1 == a[i]:
			print('Y', p1, p1)
		else:
			print('Y', p, p1)
	else:
		print('N')


from math import sqrt
n = int(input())
for i in range(n):
	d = int(input())
	b = d
	a = -1
	c = -d
	det = b ** 2 - 4 * a * c
	if det >= 0:
		ans1 = abs((b + sqrt(det)) / 2 * a)
		ans2 = abs((b - sqrt(det)) / 2 * a)
		print('Y', '{0:.9f}'.format(ans1), '{0:.9f}'.format(ans2))
	else:
		print('N')


import os
import sys
from math import *
from collections import *
from bisect import *
from io import BytesIO, IOBase

def vsInput():
	sys.stdin = open('input.txt', 'r')
	sys.stdout = open('output.txt', 'w')
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')

def value():
	return tuple(map(int, input().split()))

def array():
	return [int(i) for i in input().split()]
for _ in range(int(input())):
	a = int(input())
	try:
		print('Y', sqrt(a * a - 4 * a) / 2 + a / 2, -sqrt(a * a - 4 * a) / 2 + a / 2)
	except:
		print('N')


import math
n = int(input())
for i in range(n):
	k = int(input())
	l = k * k - 4 * k
	if l < 0:
		print('N')
		continue
	l = math.sqrt(l)
	m = (l + k) / 2
	if m == 0:
		print('Y', 0, 0)
	else:
		print('Y', m, k / m)


q = int(input())
while q > 0:
	n = int(input())
	dx = n * n - 4 * n
	if dx < 0:
		print('N')
		q = q - 1
		continue
	sdx = dx ** 0.5
	x1 = n + sdx
	x2 = n - sdx
	x1 /= 2
	x2 /= 2
	print('Y', x1, x2)
	q = q - 1


q = int(input())

def f(d, a):
	return 1 / a + 1 / (d - a)
for i in range(q):
	d = int(input())
	if d == 0.0:
		print('Y 0.000000000 0.000000000')
		continue
	if 0 < d < 4:
		print('N')
		continue
	r = d
	l = d / 2
	m = (l + r) / 2
	res = f(d, m)
	while abs(d - (d - m) * m) >= 1e-11:
		if abs(1 - res) < 1e-11:
			break
		elif res < 1.0:
			l = m
		elif res > 1.0:
			r = m
		m = (l + r) / 2
		res = f(d, m)
	if l > r:
		print('N')
	else:
		print('Y', m, d - m)


import sys
import io, os
input = sys.stdin.buffer.readline
import math
t = int(input())
for _ in range(t):
	d = int(input())
	if d == 0:
		print('Y', 0, 0)
		continue
	elif 0 < d < 4:
		print('N')
	else:
		x = d - math.sqrt(d ** 2 - 4 * d)
		y = d + math.sqrt(d ** 2 - 4 * d)
		x /= 2
		y /= 2
		print('Y', y, x)


t = int(input())
for q in range(t):
	d = int(input())
	D = d * d - 4 * d
	if D < 0:
		print('N')
	else:
		b = (d + D ** 0.5) / 2
		a = d - b
		print('Y ', end='')
		print(a, b)


t = int(input())
import math
for _ in range(t):
	n = int(input())
	try:
		if n == 0:
			print('Y', 0.0, 0.0)
		else:
			k = (-n + math.sqrt(pow(n, 2) - 4 * n)) / 2
			l = (-n - math.sqrt(pow(n, 2) - 4 * n)) / 2
			print('Y', -1 * l, -1 * k)
	except:
		print('N')


import sys
import itertools
import math
import collections
from collections import Counter

def sieve(n):
	prime = [True for i in range(n + 1)]
	p = 2
	while p * p <= n:
		if prime[p] == True:
			for i in range(p * 2, n + 1, p):
				prime[i] = False
		p += 1
	prime[0] = prime[1] = False
	r = [p for p in range(n + 1) if prime[p]]
	return r

def divs(n, start=1):
	r = []
	for i in range(start, int(math.sqrt(n) + 1)):
		if n % i == 0:
			if n / i == i:
				r.append(i)
			else:
				r.extend([i, n // i])
	return r

def ceil(n, k):
	return n // k + (n % k != 0)

def ii():
	return int(input())

def mi():
	return map(int, input().split())

def li():
	return list(map(int, input().split()))

def lcm(a, b):
	return abs(a * b) // math.gcd(a, b)

def prr(a, sep=' '):
	print(sep.join(map(str, a)))

def dd():
	return collections.defaultdict(int)
e = 10 ** (-6)

def solve(n, l, r):
	for i in range(500):
		a = l + (r - l) / 2
		b = n - a
		if abs(a + b - a * b) <= e and abs(a + b - n) <= e:
			return a
		if a * b - n > e:
			r = a - e
		else:
			l = a + e
	return -1
t = ii()
for _ in range(t):
	n = ii()
	a = solve(n, 0, n)
	print('Y', a, n - a) if a != -1 else print('N')


from math import sqrt as S
for _ in range(int(input())):
	d = int(input())
	lo = 0
	ans = -1
	hi = d
	while lo <= hi:
		mi = (lo + hi) / 2
		a = mi
		b = d - mi
		if abs(a * b - d) <= 10 ** (-6):
			ans = mi
			break
		elif a * b - d < 0:
			lo = mi + 1e-09
		else:
			hi = mi - 1e-09
	if ans == -1:
		print('N')
	else:
		print('Y', ans, d - ans)
	continue


import math
t = int(input())
for _ in range(t):
	d = int(input())
	try:
		a = 0.5 * (d + math.sqrt(d * (d - 4)))
		b = d - a
		print('Y', a, b)
	except:
		print('N')


import math
t = int(input())
for i in range(t):
	d = int(input())
	if d < 4 and d != 0:
		print('N')
		continue
	if d == 0:
		print('Y', 0, 0)
	else:
		c = math.sqrt(d * d - 4 * d)
		print('Y', (d + c) / 2, (d - c) / 2)


import sys
input = sys.stdin.readline
t = int(input())
for zzz in range(t):
	d = int(input())
	l = 0
	r = d
	ans = (0, 0)
	found = False
	while l < r:
		a = (l + r) / 2
		val = pow(a, 2) - a * d + d
		if abs(val) <= 1e-06:
			ans = (a, d - a)
			if ans[0] > 0 and ans[1] > 0:
				found = True
				break
		if val < 0:
			l = a
		else:
			r = a
	if found or d == 0:
		print('Y ' + str(ans[0]) + ' ' + str(ans[1]))
	else:
		print('N')


t = int(input())
for _ in range(t):
	d = int(input())
	tmp = d * d - 4 * d
	if tmp < 0:
		print('N')
		continue
	a = (d + tmp ** 0.5) / 2
	b = (d - tmp ** 0.5) / 2
	print('Y', '{0:.10f}'.format(a), '{0:.10f}'.format(b))


count = 0

def binary_search(_min, _max, _sum, multi):
	global count
	count += 1
	if _max < 1 / 10 ** 8 or _min > _sum / 2 - 1 / 10 ** 8:
		return -1
	mid = (_min + _max) / 2
	if count > 200:
		return mid
	tmp = mid * (_sum - mid) - multi
	if abs(tmp) < 10 ** (-8):
		return mid
	elif tmp < 0:
		return binary_search(mid, _max, _sum, multi)
	else:
		return binary_search(_min, mid, _sum, multi)
n = int(input())
for i in range(n):
	count = 0
	d = float(input())
	if d < 10 ** (-8):
		print('Y 0 0')
		continue
	if d * d < 4 * d:
		print('N')
		continue
	tm = binary_search(0, d / 2, d, d)
	if tm == -1.0:
		print('N')
	else:
		print('Y {} {}'.format(tm, d - tm))


for _ in [0] * int(input()):
	d = int(input())
	D = d * (d - 4)
	if D < 0:
		print('N')
	else:
		x = (d - D ** 0.5) / 2
		print('Y', x, d - x)


import math
t = int(input())
while t:
	t -= 1
	d = int(input())
	delta = d ** 2 - 4 * -1 * -d
	if delta < 0:
		print('N')
		continue
	a = (-d + delta ** (1 / 2)) / -2
	b = (-d - delta ** (1 / 2)) / -2
	if a < 0 or b < 0:
		print('N')
		continue
	print('Y', a, b)


import math
test_cases = int(input())
for i in range(test_cases):
	n = int(input())
	if n == 0:
		print('Y', 0.0, 0.0)
	elif n < 4:
		print('N')
	else:
		diff = math.sqrt(n ** 2 - n * 4)
		print('Y', (n + diff) / 2, (n - diff) / 2)


import math
n = int(input())
mas = []
for i in range(0, n):
	mas.append(int(input()))
for i in range(0, n):
	d = mas[i]
	if d * d - 4 * d >= 0:
		D = math.sqrt(d * d - 4 * d)
		a = (d + D) / 2
		b = (d - D) / 2
		print('Y', ' ', a, ' ', b, ' ')
	else:
		print('N')


import math
for _ in range(int(input())):
	d = int(input())
	if d * d < 4 * d:
		print('N')
	else:
		print('Y', end=' ')
		k = math.sqrt(d * d - 4 * d)
		print((d + k) / 2, (d - k) / 2)


from math import sqrt as S
for _ in range(int(input())):
	d = int(input())
	if d * d - 4 * d < 0:
		print('N')
		continue
	num1 = d + S(d * d - 4 * d)
	num2 = d - S(d * d - 4 * d)
	deno = 2
	a = num1 / 2
	b = d - a
	if a >= 0 and b >= 0 and (abs(a * b - d) <= 0.1 ** 8):
		print('Y', end=' ')
		print(a, b)
		continue
	a = num2 / 2
	b = d - a
	if a >= 0 and b >= 0:
		print('Y', end=' ')
		print(a, b)
		continue
	print('N')


from sys import stdin, stdout
import cProfile, math
from collections import Counter
from bisect import bisect_left, bisect, bisect_right
import itertools
from copy import deepcopy
from fractions import Fraction
printHeap = str()
memory_constrained = False
P = 10 ** 9 + 7
import sys
sys.setrecursionlimit(10000000)

class Operation:

	def __init__(self, name, function, function_on_equal, neutral_value=0):
		self.name = name
		self.f = function
		self.f_on_equal = function_on_equal

def add_multiple(x, count):
	return x * count

def min_multiple(x, count):
	return x

def max_multiple(x, count):
	return x
sum_operation = Operation('sum', sum, add_multiple, 0)
min_operation = Operation('min', min, min_multiple, 1000000000.0)
max_operation = Operation('max', max, max_multiple, -1000000000.0)

class SegmentTree:

	def __init__(self, array, operations=[sum_operation, min_operation, max_operation]):
		self.array = array
		if type(operations) != list:
			raise TypeError('operations must be a list')
		self.operations = {}
		for op in operations:
			self.operations[op.name] = op
		self.root = SegmentTreeNode(0, len(array) - 1, self)

	def query(self, start, end, operation_name):
		if self.operations.get(operation_name) == None:
			raise Exception('This operation is not available')
		return self.root._query(start, end, self.operations[operation_name])

	def summary(self):
		return self.root.values

	def update(self, position, value):
		self.root._update(position, value)

	def update_range(self, start, end, value):
		self.root._update_range(start, end, value)

	def __repr__(self):
		return self.root.__repr__()

class SegmentTreeNode:

	def __init__(self, start, end, segment_tree):
		self.range = (start, end)
		self.parent_tree = segment_tree
		self.range_value = None
		self.values = {}
		self.left = None
		self.right = None
		if start == end:
			self._sync()
			return
		self.left = SegmentTreeNode(start, start + (end - start) // 2, segment_tree)
		self.right = SegmentTreeNode(start + (end - start) // 2 + 1, end, segment_tree)
		self._sync()

	def _query(self, start, end, operation):
		if end < self.range[0] or start > self.range[1]:
			return None
		if start <= self.range[0] and self.range[1] <= end:
			return self.values[operation.name]
		self._push()
		left_res = self.left._query(start, end, operation) if self.left else None
		right_res = self.right._query(start, end, operation) if self.right else None
		if left_res is None:
			return right_res
		if right_res is None:
			return left_res
		return operation.f([left_res, right_res])

	def _update(self, position, value):
		if position < self.range[0] or position > self.range[1]:
			return
		if position == self.range[0] and self.range[1] == position:
			self.parent_tree.array[position] = value
			self._sync()
			return
		self._push()
		self.left._update(position, value)
		self.right._update(position, value)
		self._sync()

	def _update_range(self, start, end, value):
		if end < self.range[0] or start > self.range[1]:
			return
		if start <= self.range[0] and self.range[1] <= end:
			self.range_value = value
			self._sync()
			return
		self._push()
		self.left._update_range(start, end, value)
		self.right._update_range(start, end, value)
		self._sync()

	def _sync(self):
		if self.range[0] == self.range[1]:
			for op in self.parent_tree.operations.values():
				current_value = self.parent_tree.array[self.range[0]]
				if self.range_value is not None:
					current_value = self.range_value
				self.values[op.name] = op.f([current_value])
		else:
			for op in self.parent_tree.operations.values():
				result = op.f([self.left.values[op.name], self.right.values[op.name]])
				if self.range_value is not None:
					bound_length = self.range[1] - self.range[0] + 1
					result = op.f_on_equal(self.range_value, bound_length)
				self.values[op.name] = result

	def _push(self):
		if self.range_value is None:
			return
		if self.left:
			self.left.range_value = self.range_value
			self.right.range_value = self.range_value
			self.left._sync()
			self.right._sync()
			self.range_value = None

	def __repr__(self):
		ans = '({}, {}): {}\n'.format(self.range[0], self.range[1], self.values)
		if self.left:
			ans += self.left.__repr__()
		if self.right:
			ans += self.right.__repr__()
		return ans

def display(string_to_print):
	stdout.write(str(string_to_print) + '\n')

def primeFactors(n):
	factors = dict()
	for i in range(2, math.ceil(math.sqrt(n)) + 1):
		while n % i == 0:
			if i in factors:
				factors[i] += 1
			else:
				factors[i] = 1
			n = n // i
	if n > 2:
		factors[n] = 1
	return factors

def isprime(n):
	if n < 4:
		return True
	if n % 2 == 0:
		return False
	if n % 3 == 0:
		return False
	i = 5
	w = 2
	while i * i <= n:
		if n % i == 0:
			return False
		i += w
		w = 6 - w
	return True

def test_print(*args):
	if test:
		print(args)

def display_list(list1, sep=' '):
	stdout.write(sep.join(map(str, list1)) + '\n')

def get_int():
	return int(stdin.readline().strip())

def get_tuple():
	return map(int, stdin.readline().split())

def get_list():
	return list(map(int, stdin.readline().split()))
memory = dict()

def clear_cache():
	global memory
	memory = dict()

def cached_fn(fn, *args):
	global memory
	if args in memory:
		return memory[args]
	else:
		result = fn(*args)
		memory[args] = result
		return result
TestCases = True
test = False

def main():
	d = get_int()
	s = d ** 2 - 4 * d
	if s >= 0:
		a = (d - math.sqrt(s)) / 2
		b = d - a
		print('Y', b, a)
	else:
		print('N')
if TestCases:
	for _ in range(get_int()):
		cProfile.run('main()') if test else main()
else:
	cProfile.run('main()') if test else main()


import math
anses = []
t = int(input())
for i in range(t):
	ans = ''
	d = int(input())
	diskr = d * (d - 4)
	if diskr < 0:
		ans = 'N'
	elif diskr == 0:
		if d == 4:
			ans = 'Y 2 2'
		else:
			ans = 'Y 0 0'
	else:
		a = (d + math.sqrt(diskr)) / 2
		b = d - a
		ans = 'Y ' + str(a) + ' ' + str(b)
	anses.append(ans)
for ans in anses:
	print(ans)


from math import sqrt
t = int(input())
while t > 0:
	d = int(input())
	if d * d - 4 * d < 0:
		print('N')
	else:
		b = (d + sqrt(d * d - 4 * d)) / 2
		print('Y', '{0:.10f}'.format(b), d - b)
	t -= 1


from math import sqrt
n = int(input())
d = []
for i in range(n):
	d.append(int(input()))
for i in range(n):
	if d[i] >= 4:
		a = (sqrt((d[i] - 4) * d[i]) + d[i]) / 2
		b = d[i] - a
		print('Y ', a, ' ', b)
	elif d[i] == 0:
		print('Y 0.000000000 0.000000000')
	else:
		print('N')


mod = 1e-09

def ab(b):
	return b * b / (b - 1)

def binsearch(number):
	last = number
	first = 2
	mid = (last + first) / 2
	while last >= first:
		if ab(mid) < number + mod and ab(mid) > number - mod:
			return mid
		elif ab(mid) > number:
			last = mid - mod
		else:
			first = mid + mod
		mid = (last + first) / 2
	return -1
t = int(input())
while t > 0:
	d = int(input())
	if d < 4:
		if d != 0:
			print('N')
		elif d == 0:
			print('Y 0.000000000 0.000000000')
	else:
		b = binsearch(d)
		if b == -1:
			print('N')
		else:
			a = d - b
			print('Y', a, b)
	t -= 1


import math
tc = int(input())
while tc:
	tc -= 1
	d = float(input())
	if d * d >= 4 * d:
		a = (d + math.sqrt(d * d - 4 * d)) / 2.0
		b = (d - math.sqrt(d * d - 4 * d)) / 2.0
		print('Y ' + str(a) + ' ' + str(b))
	else:
		print('N')


from math import sqrt
t = int(input())
for i in range(t):
	d = int(input())
	if d * d < 4 * d:
		print('N')
	else:
		D = sqrt(d * d - 4 * d)
		x = (d + D) / 2
		y = (d - D) / 2
		if x >= 0 and y >= 0:
			print('Y', x, y)
		else:
			print('N')


import math
n = int(input())
a = 0.0
b = 0.0
for i in range(n):
	d = int(input())
	try:
		a = math.sqrt(d * (d - 4))
	except:
		print('N')
		continue
	(a, b) = ((d + a) / 2, (d - a) / 2)
	print('Y', a, b)


import math
for i in range(int(input())):
	d = float(input())
	a = 0.0
	b = 0.0
	if d * d - 4 * d >= 0:
		a = (d + math.sqrt(d * d - 4 * d)) / 2
		b = d - a
		print('Y ' + str(a) + ' ' + str(b))
	else:
		print('N')


import math
q = int(input())
while q > 0:
	w = int(input())
	if w * w - 4 * w < 0:
		print('N')
	else:
		b = (w + math.sqrt(w * w - 4 * w)) / 2
		print('Y', '%.10f' % b, w - b)
	q = q - 1


def f(x, d):
	return x ** 2 - d * x + d

def findroot(d):

	def bsearch(left, right):
		mid = (left + right) * 0.5
		if d < 4 and d != 0:
			return 'N'
		elif f(mid, d) > 10 ** (-6):
			return bsearch(mid, right)
		elif f(mid, d) < -10 ** (-6):
			return bsearch(left, mid)
		else:
			return ['Y', mid, mid if d == 0 else d / mid]
	return bsearch(0, d)
T = int(input())
seq = []
for i in range(T):
	seq.append(int(input()))
for i in range(T):
	root = findroot(seq[i])
	if root == 'N':
		print('N')
	else:
		print('{} {} {}'.format(root[0], root[1], root[2]))


import math
for i in range(int(input())):
	n = int(input())
	d = n * n - n * 4
	if d >= 0:
		d = math.sqrt(d)
		print('Y ' + str((n + d) / 2) + ' ' + str((n - d) / 2))
	else:
		print('N')


read = lambda : [int(i) for i in input().split()]
n = int(input())
for _ in range(n):
	d = int(input())
	D = d * d - 4 * d
	if D < 0:
		print('N')
	else:
		sq = D ** 0.5
		x1 = (d + sq) / 2
		x2 = (d - sq) / 2
		print('Y', x1, x2)


for _ in ' ' * int(input()):
	c = int(input())
	if 0 < c < 4:
		print('N')
		continue
	k = (c + (c ** 2 - 4 * c) ** 0.5) / 2
	print('Y', k, c - k)


import math
t = int(input())
for counter in range(t):
	d = int(input())
	try:
		if d == 0:
			print('Y 0.0 0.0')
		else:
			a = 0.0
			a = (float(d) + math.sqrt(float(d ** 2) - 4 * d)) / 2
			b = a / (a - 1)
			if a < 0 or b < 0:
				print('N')
			else:
				print('Y ' + str(a) + ' ' + str(b))
	except:
		print('N')


import math
tenMinusSix = 1e-06
step = 1e-12

def withinMargin(x):
	if x <= tenMinusSix:
		return True
	return False

def verify(a, b):
	if a < 0 or b < 0:
		return False
	s = a + b
	p = a * b
	dif1 = abs(s - p)
	dif2 = abs(s - d)
	if withinMargin(dif1) and withinMargin(dif2):
		return True
	return False
t = int(input())
for i in range(t):
	sol = []
	d = int(input())
	found = False
	lower = 0
	upper = 2
	while lower <= upper:
		if verify(lower, d - lower):
			sol = [lower, d - lower]
			found = True
			break
		if lower == upper:
			break
		if verify(upper, d - upper):
			sol = [upper, d - upper]
			found = True
			break
		middle = (lower + upper) / 2
		if verify(middle, d - middle):
			sol = [middle, d - middle]
			found = True
			break
		if middle * (d - middle) > d:
			upper = middle - step
		else:
			lower = middle + step
	if found:
		ans = 'Y '
		ans += ' '.join(('%0.12f' % item for item in reversed(sol)))
		print(ans)
	else:
		print('N')


from math import modf
for _ in range(int(input())):
	d = int(input())
	temp = d * d - 4 * d
	if temp < 0:
		print('N')
	else:
		b1 = (d + temp ** 0.5) / 2
		b2 = (d - temp ** 0.5) / 2
		a1 = d - b1
		a2 = d - b2
		p = modf(round(a1 + b1))
		q = modf(round(a1 * b1))
		r = modf(round(a2 + b2))
		s = modf(round(a2 * b2))
		if p[1] == d and q[1] == d:
			print('Y', a1, b1)
		elif r[1] == d and s[1] == d:
			print('Y', a2, b2)
		else:
			print('N')


import math
t = int(input())
for i in range(0, t):
	n = int(input())
	if n == 0:
		print('Y', 0, 0)
	elif n == 1 or n == 2 or n == 3:
		print('N')
	else:
		j = n - 2 - math.sqrt(pow(n - 2, 2) - 4)
		j = j / 2
		print('Y', 1 + j, n - 1 - j)


import sys

def inpt():
	return sys.stdin.readline().strip()
from math import sqrt
n = int(inpt())
for i in range(n):
	c = int(inpt())
	try:
		x1 = (c + sqrt(c * c - 4 * c)) / 2
		x2 = (c - sqrt(c * c - 4 * c)) / 2
		print('Y', x1, x2)
	except ValueError:
		print('N')


import math

def solve():
	d = float(input())
	D = d * d - 4 * d
	if D < 0:
		print('N')
	else:
		x1 = (d + math.sqrt(D)) * 0.5
		x2 = (d - math.sqrt(D)) * 0.5
		if x1 >= 0 and x2 >= 0:
			print('Y', x1, x2)
		else:
			print('N')
t = int(input())
for _ in range(t):
	solve()


import math
t = int(input())
for x in range(t):
	k = int(input())
	while True:
		try:
			ansA = (k + math.sqrt(k ** 2 - 4 * k)) / 2
			ansB = (k - math.sqrt(k ** 2 - 4 * k)) / 2
			print('Y %.9f' % ansA, end=' ')
			print('%.9f' % ansB)
			break
		except ValueError:
			print('N')
			break


from math import sqrt as s
for _ in ' ' * int(input()):
	n = int(input())
	print(*(('Y ', (n + s(n ** 2 - 4 * n)) / 2, n - (n + s(n ** 2 - 4 * n)) / 2) if n ** 2 - 4 * n >= 0 else 'N'))


for i in range(int(input())):
	d = int(input())
	disc = d ** 2 - 4 * d
	if disc < 0:
		print('N')
	else:
		b1 = (-d + disc ** 0.5) / -2
		b2 = (-d - disc ** 0.5) / -2
		a1 = d - b1
		a2 = d - b2
		if b1 >= 0 and a1 >= 0:
			print('Y', a1, b1)
		elif b2 >= 0 and a2 >= 0:
			print('Y', a2, b2)
		else:
			print('N')


eps = 1e-07

def f(d):
	(l, r) = (2.0, d)
	while r - l > eps:
		mid = (l + r) * 0.5
		if mid ** 2 / (mid - 1) < d:
			l = mid
		else:
			r = mid
	return (l + r) * 0.5
t = int(input())
for _ in range(t):
	a = int(input())
	if a == 0:
		print('Y', 0.0, 0.0)
	elif a in [1, 2, 3]:
		print('N')
	else:
		x = f(a)
		print('Y', x, x / (x - 1.0))


import math
t = int(input())
for i in range(t):
	d = int(input())
	if d == 0:
		a = 0.0
		b = 0.0
	elif d < 4:
		print('N')
		continue
	else:
		D = d ** 2 - 4 * d
		b = (d - math.sqrt(D)) / 2
		a = d - b
	print('Y', a, b)


for _ in range(int(input())):
	d = int(input())
	if d == 0:
		print('Y', 0, 0)
		continue
	if 0 < d < 4:
		print('N')
		continue
	a = (d + (d ** 2 - 4 * d) ** 0.5) / 2
	b = (d - (d ** 2 - 4 * d) ** 0.5) / 2
	print('Y', a, b)


from math import ceil
t = int(input())
for i in range(t):
	d = int(input())
	if d * d - 4 * d < 0:
		print('N')
		continue
	(ans1, ans2) = ((d + (d * d - 4 * d) ** 0.5) / 2, (d - (d * d - 4 * d) ** 0.5) / 2)
	print('Y', ans1, ans2, sep=' ')


import time
import collections
import math

class Time_test:

	def __enter__(self):
		self.enter_time = time.time()

	def __exit__(self, exc_type, exc_val, exc_tb):
		print('Command was executed in', time.time() - self.enter_time)
t = int(input())
for i in range(t):
	d = float(input())
	if d * d - 4 * d < 0:
		print('N')
	else:
		print('Y', end=' ')
		print(format((d + math.sqrt(d * d - 4 * d)) / 2, '.9f'), end=' ')
		print(format((d - math.sqrt(d * d - 4 * d)) / 2, '.9f'))


from math import sqrt
t = int(input())
for _ in range(t):
	d = int(input())
	try:
		a = (d + sqrt(d ** 2 - 4 * d)) / 2
		if a == 0:
			b = 0
		else:
			b = d / a
		print('Y', a, b)
	except ValueError:
		print('N')


import math
for _ in range(int(input())):
	d = int(input())
	D = d ** 2 - 4 * d
	if D < 0:
		print('N')
	else:
		a = (d + math.sqrt(D)) / 2
		b = (d - math.sqrt(D)) / 2
		print('Y', a, b)


from math import *
l = int(input())
for j in range(l):
	n = int(input())
	u1 = 10 ** (-6)
	u2 = sqrt(n)
	for i in range(10 ** 3):
		a = (u1 + u2) / 2
		if a * (n - a) <= n:
			u1 = a
		else:
			u2 = a
	if abs(u1 * (n - u1) - n) < 1e-05:
		print('Y', '%.10f' % abs(u1), '%.10f' % abs(n - u1))
	else:
		print('N')


import math
n = int(input())
a = []
for i in range(0, n):
	a.append(int(input()))
for i in range(0, n):
	if a[i] * a[i] - 4 * a[i] < 0:
		print('N')
		continue
	print('Y', end=' ')
	x = (a[i] - math.sqrt(a[i] * a[i] - 4 * a[i])) / 2
	y = (a[i] + math.sqrt(a[i] * a[i] - 4 * a[i])) / 2
	print(x, end=' ')
	print(y)


n = int(input())
for i in range(n):
	d = float(input())
	D = d ** 2 - 4 * d
	if D < 0:
		print('N')
	else:
		a = (d + D ** (1 / 2)) / 2
		b = (d - D ** (1 / 2)) / 2
		print('Y {:.9f} {:.9f}'.format(a, b))


import math
for i in range(int(input())):
	d = int(input())
	D = d * d - 4 * d
	if D < 0:
		print('N')
	else:
		a = (d + math.sqrt(D)) / 2
		b = (d - math.sqrt(D)) / 2
		print('Y', '%.10f' % a, '%.10f' % b, sep=' ')


t = int(input())
L = []
for i in range(t):
	L.append(input())

def run(n):
	if n == 0:
		print('Y 0 0')
	elif n >= 4:
		a = (n - (n ** 2 - 4 * n) ** 0.5) / 2
		b = n - a
		print('Y ' + str(max(a, b)) + ' ' + str(min(a, b)))
	else:
		print('N')
for item in L:
	run(float(item))


n = int(input())
for i in range(n):
	d = int(input())
	D = d ** 2 - 4 * d
	if D >= 0:
		b1 = (d + D ** 0.5) / 2
		b2 = (d - D ** 0.5) / 2
	if D < 0 or (b1 < 0 and b2 < 0):
		print('N')
	else:
		a1 = d - b1
		a2 = d - b2
		if a1 >= 0 and b1 >= 0:
			print('Y', '%.9f' % a1, '%.9f' % b1)
		elif a2 >= 0 and b2 >= 0:
			print('Y', '%.9f' % a2, '%.9f' % b2)
		else:
			print('N')


import math
t = int(input())
for i in range(t):
	n = int(input())
	cal = n * n - 4 * n
	if cal >= 0:
		cal = math.sqrt(cal)
		b = (n + cal) / 2
		a = n - b
		print('Y', a, b)
	else:
		print('N')


import math
cases = int(input())

def meme(d):
	d = float(d)
	det = d ** 2 - 4 * d
	if det < 0:
		return 'N'
	r1 = (d + math.sqrt(det)) / 2
	r2 = (d - math.sqrt(det)) / 2
	if r1 < 0 or r2 < 0:
		return 'N'
	return 'Y ' + str(r1) + ' ' + str(r2)
for case in range(cases):
	d = int(input())
	print(meme(d))


def root2(b, c):
	delta = b ** 2 - 4 * c
	if delta >= 0:
		import math
		u = math.sqrt(delta)
		x1 = (-b + u) / 2
		x2 = (-b - u) / 2
		print('Y', x1, x2)
	else:
		print('N')
t = int(input())
l = []
for i in range(t):
	l.append(int(input()))
for k in l:
	root2(-k, k)


import math
for _ in range(int(input())):
	k = int(input())
	if k < 4 and k > 0:
		print('N')
	else:
		l = (k + math.sqrt(k ** 2 - 4 * k)) / 2
		print('Y', l, k - l)


import math
t = int(input())
while t > 0:
	t -= 1
	d = int(input())
	delta = d * d - 4 * d
	if delta < 0:
		print('N')
		continue
	x1 = (-d + math.sqrt(delta)) / 2
	x2 = (-d - math.sqrt(delta)) / 2
	if x1 < 0:
		x1 *= -1
	if x2 < 0:
		x2 *= -1
	if x1 >= 0 and x2 >= 0:
		print('Y', x1, x2)
	else:
		print('N')


import math
t = int(input())

def solve(d):
	if d < 4:
		return (0, 0)
	a = (math.sqrt(d * (d - 4)) + d) / 2
	b = d - a
	return (a, b)
for i in range(t):
	d = int(input())
	a = solve(d)
	if a[0] > 0 or d == 0:
		print('Y', *a)
	else:
		print('N')


T = int(input())
for _ in range(T):
	d = int(input())
	if d == 0:
		print('Y 0.000000000 0.000000000')
		continue
	l = 0.0
	h = d
	EPS = 1e-12
	b = True
	while h - l > EPS and b:
		m = (l + h) / 2
		if abs(d - (m + d / m)) < EPS and abs(m * (d / m) - (m + d / m)) < EPS:
			print('Y {0} {1}'.format(m, d - m))
			b = not b
		elif m + d / m < d:
			l = m
		else:
			h = m
	if b:
		print('N')


from math import sqrt
T = int(input())
for t in range(T):
	d = int(input())
	if d * d >= 4 * d:
		x = d / 2 + sqrt(d * d - 4 * d) / 2
		print('Y', x, d - x)
	else:
		print('N')


from math import sqrt
for _ in range(int(input())):
	d = int(input())
	if d == 0:
		print('Y', end=' ')
		print(0, 0)
	elif d < 4:
		print('N')
	else:
		print('Y', end=' ')
		dis = sqrt(d * d - 4 * d)
		a = (d + dis) / 2
		b = (d - dis) / 2
		print(a, b)


from math import sqrt
global valid

def calc(d):
	l = []
	delt = sqrt(d ** 2 - 4 * d)
	x = (d + delt) / 2
	l.append(x)
	x = (d - delt) / 2
	l.append(x)
	return l
m = int(input())
while m != 0:
	n = int(input())
	if n > 3 or n == 0:
		l = calc(n)
		print('Y {0:.9f} {1:.9f}'.format(l[0], l[1]))
	else:
		print('N')
	m -= 1


import sys
sys.setrecursionlimit(15000)
t = int(input())

def bin(lo, hi, targ):
	mid = (hi + lo) / 2
	ti = mid * (targ - mid)
	if abs(ti - targ) < 1 / 1000000:
		return (mid, targ - mid)
	if ti < targ:
		return bin(mid, hi, targ)
	return bin(lo, mid, targ)
for _ in range(t):
	d = int(input())
	if d == 0:
		print('Y 0 0')
	elif d / 2 * (d / 2) < d:
		print('N')
	else:
		(a, b) = bin(0, d / 2, d)
		print(f'Y {a} {b}')


from math import sqrt
t = int(input())
for i in range(t):
	d = int(input())
	if d == 0:
		print('Y 0 0')
	elif d < 4:
		print('N')
	else:
		delta = d * d - 4 * d
		a1 = (d + sqrt(delta)) / 2
		a2 = (d - sqrt(delta)) / 2
		b1 = d - a1
		b2 = d - a2
		if a1 >= 0 and b1 >= 0:
			print('Y', end=' ')
			print(a1, end=' ')
			print(b1)
		elif a2 >= 0 and b2 >= 0:
			print('Y', end=' ')
			print(a2, end=' ')
			print(b2)
		else:
			print('N')


T = int(input())
for _ in range(T):
	d = int(input())
	if d == 0:
		print('Y 0.000000000 0.000000000')
	elif d < 4:
		print('N')
	else:
		a = (d + (d ** 2 - 4 * d) ** 0.5) / 2
		b = (d - (d ** 2 - 4 * d) ** 0.5) / 2
		if a >= 0 and b >= 0:
			print(f'Y {a:.9f} {b:.9f}')
		else:
			print('N')


import math
t = int(input())
for xx in range(t):
	a = int(input())
	if a == 0:
		print('Y', 0, 0)
	elif a < 4:
		print('N')
	else:
		print('Y', (a + math.sqrt(a * a - 4 * a)) / 2, (a - math.sqrt(a * a - 4 * a)) / 2)


def find_vals(d):
	lo = 0
	high = d
	mid = 0
	iterations = 0
	while lo <= high and iterations < 10000:
		iterations += 1
		mid = (high + lo) / 2
		if mid == 1:
			lo = mid
			continue
		(a, b) = (mid, mid / (mid - 1))
		if abs(a + b - d) < 1e-06:
			return (True, a, abs(b))
		elif a + b < d:
			lo = mid
		else:
			high = mid
	return (False, 0, 0)
t = int(input())
while t > 0:
	d = int(input())
	(y, a, b) = find_vals(d)
	if y:
		print('Y %s %s' % (a, b))
	else:
		print('N')
	t -= 1


for _ in range(int(input())):
	d = int(input())
	anws = False
	if d ** 2 >= 4 * d:
		root = (d ** 2 - 4 * d) ** 0.5
		a = (d + root) / 2
		b = (d - root) / 2
		anws = True
	if anws:
		print('Y {:.9f} {:.9f}'.format(a, b))
	else:
		print('N')


def Get_Discriminant(a, b, c):
	return b * b - 4 * a * c

def Get_Roots(a, b, c):
	disc = Get_Discriminant(a, b, c)
	if disc > 0:
		root1 = round((-b - disc ** 0.5) / (2 * a), 9)
		root2 = round((-b + disc ** 0.5) / (2 * a), 9)
		return (root1, root2)
	elif disc == 0:
		root = round(-b / (2 * a), 9)
		return (root, root)
	else:
		return ('N', 'N')

def main():
	testCases = int(input(''))
	r_list = []
	i = 0
	while i < testCases:
		d = int(input(''))
		disc = Get_Discriminant(a=-1, b=d, c=-d)
		if disc >= 0:
			(root1, root2) = Get_Roots(a=-1, b=d, c=-d)
			r_list.append(['Y', abs(root1), abs(root2)])
		else:
			r_list.append(['N'])
		i += 1
	for item1 in r_list:
		for item2 in item1:
			print(item2, end=' ', flush=True)
		print('')
main()


def check(a, b):
	return a * b < a + b

def solve(n):
	if n == 0:
		return (0, 0)
	if n >= 1 and n <= 3:
		return None
	eps = 10 ** (-10)
	(l, r) = (n / 2, n)
	while r - l > eps:
		x = (l + r) / 2
		if check(x, n - x):
			r = x
		else:
			l = x
	x = (l + r) / 2
	return (x, n - x)
n = int(input())
for i in range(n):
	d = int(input())
	try:
		(a, b) = solve(d)
		print('Y %.9f %.9f' % (a, b))
	except Exception:
		print('N')


for _ in range(int(input())):
	n = int(input())
	l = 0
	r = n / 2
	x = 10 ** (-6)
	if 0 < n < 4:
		print('N')
		continue
	while l <= r:
		m = (l + r) / 2
		p = (n - m) * m
		if p <= n and n - p <= x:
			print('Y', n - m, m)
			break
		if p < n:
			l = m
		else:
			r = m


from math import modf, sqrt
for _ in range(int(input())):
	d = int(input())
	s = pow(d, 2) - 4 * d
	if s < 0:
		print('N')
	else:
		b1 = (d + sqrt(s)) / 2
		b2 = (d - sqrt(s)) / 2
		a1 = d - b1
		a2 = d - b2
		w = modf(round(a1 + b1))
		x = modf(round(a1 * b1))
		y = modf(round(a2 + b2))
		z = modf(round(a2 * b2))
		if w[1] == d and x[1] == d:
			print('Y', a1, b1)
		elif y[1] == d and z[1] == d:
			print('Y', a2, b2)
		else:
			print('N')


from math import sqrt

def solve(d):
	D = d * d - 4 * d
	if D >= 0:
		sD = sqrt(D)
		a1 = -(-d + sD) / 2
		a2 = -(-d - sD) / 2
		a = min(a1, a2)
		print('Y %.10f1 %.10f' % (abs(d - a), abs(a)))
	else:
		print('N')
n = int(input())
for i in range(n):
	solve(int(input()))


n = int(input())
import math
for i in range(n):
	inp = int(input())
	inp1 = inp * inp - 4 * inp
	if inp1 < 0:
		print('N')
	else:
		inp1 = math.sqrt(inp1)
		res1 = (inp + inp1) / 2
		res2 = (inp - inp1) / 2
		print('Y', res1, res2)


from collections import deque as de
import math
from math import sqrt as sq
from math import floor as fl
from math import ceil as ce
from sys import stdin, stdout
import re
from collections import Counter as cnt
from functools import reduce
from itertools import groupby as gb
from bisect import bisect_left as bl, bisect_right as br

def factors(n):
	return set(reduce(list.__add__, ([i, n // i] for i in range(1, int(n ** 0.5) + 1) if n % i == 0)))

class My_stack:

	def __init__(self):
		self.data = []

	def my_push(self, x):
		return self.data.append(x)

	def my_pop(self):
		return self.data.pop()

	def my_peak(self):
		return self.data[-1]

	def my_contains(self, x):
		return self.data.count(x)

	def my_show_all(self):
		return self.data

	def isEmpty(self):
		return len(self.data) == 0
arrStack = My_stack()

class graph:

	def __init__(self):
		self.graphdict = {}

	def add_edge(self, node, neighbor):
		if node not in self.graphdict:
			self.graphdict[node] = [neighbor]
		else:
			self.graphdict[node].append(neighbor)

	def show_edge(self):
		for node in self.graphdict:
			for neighbors in self.graphdict:
				print(node, neighbors)

	def show_graph(self):
		return self.graphdict

def decimalToBinary(n):
	return bin(n).replace('0b', '')

def binarytodecimal(n):
	return int(n, 2)

def isPrime(n):
	if n <= 1:
		return False
	if n <= 3:
		return True
	if n % 2 == 0 or n % 3 == 0:
		return False
	i = 5
	while i * i <= n:
		if n % i == 0 or n % (i + 2) == 0:
			return False
		i = i + 6
	return True

def get_prime_factors(number):
	prime_factors = []
	while number % 2 == 0:
		prime_factors.append(2)
		number = number / 2
	for i in range(3, int(math.sqrt(number)) + 1, 2):
		while number % i == 0:
			prime_factors.append(int(i))
			number = number / i
	if number > 2:
		prime_factors.append(int(number))
	return prime_factors

def get_frequency(list):
	dic = {}
	for ele in list:
		if ele in dic:
			dic[ele] += 1
		else:
			dic[ele] = 1
	return dic

def Log2(x):
	return math.log10(x) / math.log10(2)

def getProduct(n):
	product = 1
	while n != 0:
		product = product * (n % 10)
		n = n // 10
	return product

def lcm(x, y):
	lcm = x * y // math.gcd(x, y)
	return lcm

def isPowerOfTwo(n):
	return math.ceil(Log2(n)) == math.floor(Log2(n))

def checkisap(list):
	d = list[1] - list[0]
	for i in range(2, len(list)):
		temp = list[i] - list[i - 1]
		if temp != d:
			return False
	return True

def primes_method5(n):
	out = {}
	sieve = [True] * (n + 1)
	for p in range(2, n + 1):
		if sieve[p]:
			out[p] = 1
			for i in range(p, n + 1, p):
				sieve[i] = False
	return out

def getSum(n):
	strr = str(n)
	list_of_number = list(map(int, strr.strip()))
	return sum(list_of_number)

def checkperfectsquare(n):
	if ce(sq(n)) == fl(sq(n)):
		return True
	else:
		return False

def ceildiv(x, y):
	return (x + y - 1) // y

def di():
	return map(int, input().split())

def ii():
	return int(input())

def li():
	return list(map(int, input().split()))

def si():
	return list(map(str, input()))

def indict():
	dic = {}
	for (index, value) in enumerate(input().split()):
		dic[int(value)] = int(index) + 1
	return dic

def frqdict():
	dic = {}
	for (index, value) in enumerate(input()):
		if value not in dic:
			dic[value] = 1
		else:
			dic[value] += 1
	return dic
t = ii()
while t:
	t -= 1
	d = ii()
	if d * d - 4 * d < 0:
		print('N')
	else:
		temp = sq(d * d - 4 * d)
		print('Y', (d - temp) / 2, (d + temp) / 2)


import math
T = int(input())
for i in range(T):
	d = int(input())
	if abs(d) >= 4:
		a = (d + math.sqrt(d * d - 4 * d)) / 2
		b = (d - math.sqrt(d * d - 4 * d)) / 2
		print('Y' + ' ' + str(a) + ' ' + str(b))
	elif abs(d) == 0:
		print('Y' + ' ' + '0.0000000' + ' ' + '0.00000000')
	else:
		print('N')


def f(d):
	k = d * (d - 4)
	return ((d + k ** 0.5) / 2, (d - k ** 0.5) / 2)
for _ in range(int(input())):
	n = int(input())
	if n == 1:
		print('N')
	else:
		(a, b) = f(n)
		if type(a) == float and type(b) == float:
			print('Y', a, b)
		else:
			print('N')


import math
for cas in range(int(input())):
	d = float(input())
	if d == 0.0:
		print('Y', d, d)
	elif d < 4:
		print('N')
	else:
		D = 0.0
		D = math.sqrt(d ** 2 - 4 * d)
		a = (d + D) / 2
		b = (d - D) / 2
		print('Y', a, b)


t = int(input())
for i in range(t):
	d = int(input())
	det = d ** 2 - 4 * d
	if det < 0:
		print('N')
		continue
	else:
		print('Y', end=' ')
		b1 = (d + det ** 0.5) / 2
		b2 = (d - det ** 0.5) / 2
		print(str(b1), str(b2))


for _ in range(int(input())):
	d = int(input())
	if d == 0:
		print('Y %1.7f %1.7f' % (0, 0))
	else:
		D = d ** 2 - 4 * d
		if D < 0:
			print('N')
		else:
			a = (d + D ** (1 / 2)) / 2
			print('Y %1.15f %1.15f' % (a, d / a))


import math
t = int(input())
arr = []
for i in range(t):
	arr.append(int(input()))
for i in range(t):
	d = arr[i]
	if d * (d - 4) < 0:
		print('N')
	else:
		b = (d + math.sqrt(d * d - 4 * d)) / 2
		a = d - b
		print('Y', a, b)


n = int(input())
for i in range(n):
	x = int(input())
	if x ** 2 - 4 * x < 0:
		print('N')
		continue
	b = (x + (x ** 2 - 4 * x) ** 0.5) / 2
	a = x - b
	if abs(a * b - x) < 1e-08:
		print(str('Y') + ' ' + str(a) + ' ' + str(b))


def findroot(d):
	if d ** 2 < 4 * d:
		return 'N'
	else:
		num1 = (d + (d ** 2 - 4 * d) ** 0.5) / 2
		num2 = (d - (d ** 2 - 4 * d) ** 0.5) / 2
		return ['Y', num1, num2]

def print_(a):
	for i in a:
		print(i, end=' ')
num = int(input())
for i in range(num):
	tem = int(input())
	print_(findroot(tem))


import sys
for _ in range(int(input())):
	d = int(input())
	if d * d < 4 * d:
		print('N')
	else:
		db = (d * d - 4 * d) ** 0.5
		a = (db + d) / 2
		b = (d - db) / 2
		print('Y', a, b)


n = int(input())
lst = []
for i in range(n):
	lst.append(int(input()))

def solve(d):
	if d ** 2 - 4 * d < 0:
		return (None, None)
	elif d ** 2 - 4 * d == 0:
		return (d / 2, d / 2)
	else:
		delta = (d ** 2 - 4 * d) ** 0.5
		x1 = (d + delta) / 2
		x2 = (d - delta) / 2
		y1 = d - x1
		y2 = d - x2
		if x1 >= 0 and y1 >= 0:
			return (x1, y1)
		elif x2 >= 0 and y2 >= 0:
			return (x2, y2)
		else:
			return (None, None)
for d in lst:
	(x, y) = solve(d)
	if x is not None:
		print('{} {} {}'.format('Y', x, y))
	else:
		print('N')


from sys import stdin, stdout
from itertools import accumulate
import math
T = int(input())
for i in range(T):
	d = int(input())
	if d * d - 4 * d < 0:
		print('N')
	else:
		a1 = (d + math.sqrt(d * d - 4 * d)) / 2
		a2 = (d - math.sqrt(d * d - 4 * d)) / 2
		if a1 >= 0 and a2 >= 0:
			print('Y', a1, a2)
		else:
			print('N')


t = int(input())
while t:
	t = t - 1
	d = int(input())
	if d ** 2 - 4 * d < 0:
		print('N')
	else:
		k = (d ** 2 - 4 * d) ** 0.5
		print('Y ' + str((d + k) / 2) + ' ' + str((d - k) / 2))


n = int(input())
while n > 0:
	n = n - 1
	d = int(input())
	x = 1
	y = 2
	y_prev = y
	if d == 0:
		print('Y 0.000000000 0.000000000')
	elif d in [1, 2, 3]:
		print('N')
	elif d == 4:
		print('Y 2.000000000 2.000000000')
	else:
		while True:
			avg = (x + y) / 2
			cal = (d - avg) * avg
			ad = d - avg + avg
			if cal < d:
				x = avg
			elif cal > d:
				y_prev = y
				y = avg
			if abs(ad - cal) <= 10 ** (-6) and abs(ad - d) <= 10 ** (-6):
				print('Y', avg, d - avg)
				break


import math
n = int(input())
f = lambda x: x * x - 4 * x
ff = lambda x: (x + math.sqrt(f(x))) / 2
while n != 0:
	n -= 1
	d = int(input())
	if d == 0:
		print('Y 0 0')
		continue
	if f(d) < 0:
		print('N')
	else:
		a = ff(d)
		b = d / a
		print('Y', a, b)


import math
for i in range(int(input())):
	d = int(input())
	try:
		x1 = (-d + math.sqrt(d * d - 4 * d)) / -2
		print('Y', abs(x1), d - x1)
	except:
		print('N')


def success(d):
	if d < 0 or d ** 2 - 4 * d < 0:
		print('N')
	else:
		print('Y', end=' ')
		print((d + pow(d ** 2 - 4 * d, 0.5)) / 2, end=' ')
		print((d - pow(d ** 2 - 4 * d, 0.5)) / 2)
for _ in range(int(input())):
	d = int(input())
	success(d)


from math import sqrt

def calc(d):
	D = d ** 2 - 4 * d
	if D < 0:
		print('N')
		return
	if D == 0:
		a = d / 2
		b = d - a
		if a < 0 or b < 0:
			print('N')
			return
		print('Y', a, b)
		return
	a1 = (d - sqrt(D)) / 2
	b1 = d - a1
	if a1 < 0 or b1 < 0:
		a1 = (d + sqrt(D)) / 2
		b1 = d - a1
	if a1 < 0 or b1 < 0:
		print('N')
		return
	print('Y', a1, b1)
n = int(input())
for _ in range(n):
	d = int(input())
	calc(d)


import sys

def fi():
	return sys.stdin.readline()
for _ in range(int(fi())):
	d = int(fi())
	D = d ** 2 - 4 * d
	if D < 0:
		print('N')
	elif d == 0:
		print('Y', round(float(0), 9), round(float(0), 9))
	else:
		a = (d + D ** 0.5) / 2
		a = round(a, 9)
		print('Y', a, round(d / a, 9))


b = lambda d: (d + (d ** 2 - 4 * d) ** 0.5) / 2
for _ in range(int(input())):
	d = int(input())
	if 0 < d < 4:
		print('N')
	elif d == 0:
		print('Y', 0, 0)
	else:
		print('Y', b(d), d - b(d))


t = int(input())
while t:
	d = float(input())
	if d == 0:
		print('Y 0 0')
	elif d < 4:
		print('N')
	elif d == 4:
		print('Y 2 2')
	else:
		l = 1
		h = 2
		while h - l > 1e-09:
			mid = (h + l) / 2
			a = d - mid
			if a * mid == d:
				break
			elif a * mid < d:
				l = mid
			else:
				h = mid
		if h - l > 1e-09:
			mid = (h + l) / 2
			print('Y ', '%.10f' % (d - mid), '%.10f' % mid)
		else:
			print('Y ', '%.10f' % (d - l), '%.10f' % l)
	t -= 1


for t in range(int(input())):
	n = int(input())
	if n * (n - 4) >= 0:
		sqrt = (n * (n - 4)) ** 0.5
		print('Y', (n + sqrt) / 2, (n - sqrt) / 2)
	else:
		print('N')


t = int(input())
for _ in range(t):
	d = int(input())
	if d != 0 and d < 4:
		print('N')
	else:
		D = (d * (d - 4)) ** 0.5
		b1 = (D + d) / 2
		b2 = (d - D) / 2
		a1 = d - b1
		a2 = d - b2
		if b1 >= 0 and a1 >= 0:
			print('Y', a1, b1)
		elif b2 >= 0 and a2 >= 0:
			print('Y', a2, b2)
		else:
			print('N')


import math
import itertools
import collections

def getdict(n):
	d = {}
	if type(n) is list:
		for i in n:
			if i in d:
				d[i] += 1
			else:
				d[i] = 1
	else:
		for i in range(n):
			t = ii()
			if t in d:
				d[t] += 1
			else:
				d[t] = 1
	return d

def cdiv(n, k):
	return n // k + (n % k != 0)

def ii():
	return int(input())

def mi():
	return map(int, input().split())

def li():
	return list(map(int, input().split()))

def lcm(a, b):
	return abs(a * b) // math.gcd(a, b)

def wr(arr):
	return ' '.join(map(str, arr))

def prime(n):
	if n == 2:
		return True
	if n % 2 == 0 or n <= 1:
		return False
	sqr = int(math.sqrt(n)) + 1
	for d in range(3, sqr, 2):
		if n % d == 0:
			return False
	return True

def revn(n):
	m = 0
	while n > 0:
		m = m * 10 + n % 10
		n = n // 10
	return m
t = ii()
for i in range(t):
	d = ii()
	print('N') if d * d - 4 * d < 0 else print('Y', (d + math.sqrt(d * d - 4 * d)) / 2, (d - math.sqrt(d * d - 4 * d)) / 2)


n = int(input())
inputs = []
for inp in range(n):
	inputs.append(int(input()))
for n in inputs:
	sqrt = n ** 2 - 4 * n
	if sqrt >= 0:
		non_zero = n + sqrt ** 0.5
		if non_zero != 0:
			a = 2 * n / non_zero
			b = non_zero / 2
			print('Y', a, b)
		else:
			print('Y', float(0), float(0))
	else:
		print('N')


import math
t = int(input())

def solve(n):
	if d == 0:
		print('Y', 0.0, 0.0)
		return
	if d < 4:
		print('N')
		return
	D = float(math.sqrt(d * (d - 4)))
	a = (d + D) / 2
	b = (d - D) / 2
	print('Y', a, b)
while t > 0:
	d = int(input())
	solve(d)
	t -= 1


import sys
import math
fileoperation = 0
if fileoperation:
	orig_stdout = sys.stdout
	orig_stdin = sys.stdin
	inputfile = open('W:/Competitive Programming/input.txt', 'r')
	outputfile = open('W:/Competitive Programming/output.txt', 'w')
	sys.stdin = inputfile
	sys.stdout = outputfile
mod = 1000000007

def nospace(l):
	ans = ''.join((str(i) for i in l))
	return ans
t = int(input())
for tt in range(t):
	n = int(input())
	dd = n * n - 4 * n
	if dd >= 0:
		dd = pow(dd, 0.5)
		print('Y', (n + dd) / 2, (n - dd) / 2)
	else:
		print('N')
if fileoperation:
	sys.stdout = orig_stdout
	sys.stdin = orig_stdin
	inputfile.close()
	outputfile.close()


n = int(input())
for i in range(n):
	d = int(input())
	det = d * d - 4 * d
	if det < 0:
		print('N')
	else:
		print('Y', (d + det ** (1 / 2)) / 2, (d - det ** (1 / 2)) / 2)


n = int(input())
for i in range(n):
	d = int(input())
	D = d * (d - 4)
	if D < 0:
		print('N')
		continue
	if D == 0:
		a = abs(-d / 2)
		if a != 0:
			b = d / a
		else:
			b = 0.0
		print('Y', a, b)
		continue
	a1 = (-d - D ** 0.5) / 2
	a2 = (-d + D ** 0.5) / 2
	a1 = abs(max(a1, a2))
	if a1 != 0:
		b1 = d / a1
	else:
		b1 = 0.0
	print('Y', a1, b1)


import math
t = int(input())
for i in range(t):
	d = int(input())
	r = d * d - 4 * d
	if r < 0:
		print('N')
	else:
		a1 = (d + math.sqrt(r)) / 2
		b1 = d - a1
		if a1 + b1 == d and round(a1 * b1) == d:
			print('Y %.10f %.10f' % (a1, b1))
		else:
			a1 = (d - math.sqrt(r)) / 2
			b1 = d - a1
			if a1 + b1 == d and round(a1 * b1) == d:
				print('Y %.10f %.10f' % (a1, b1))
			else:
				print('N')


import sys
from array import array
import typing as Tp

def input():
	return sys.stdin.buffer.readline().decode('utf-8')

def main():
	for _ in range(int(input())):
		n = float(input())
		(ok1, ng1) = (0.0, n)
		ans2 = 0.0
		for _ in range(50):
			mid1 = (ok1 + ng1) / 2
			(ok2, ng2) = (0.0, 1000000000.0)
			for _ in range(100):
				mid2 = (ok2 + ng2) / 2
				if mid1 * mid2 <= mid1 + mid2:
					ok2 = mid2
				else:
					ng2 = mid2
			if mid1 + ok2 <= n:
				ok1 = mid1
				ans2 = ok2
			else:
				ng1 = mid1
		if abs(n - (ok1 + ans2)) <= 1e-07:
			print(f'Y {ok1} {ans2}')
		else:
			print('N')
main()


def solve(n):
	(l, r) = (0, n)
	while l < r:
		m = (l + r) / 2
		prod = m * (n - m)
		if abs(prod - n) < 1e-06:
			return m
		if prod < n:
			l = m
		else:
			r = m
	return -1
t = int(input())
for i in range(t):
	n = int(input())
	if n == 0:
		print('Y 0 0')
	else:
		a = solve(n)
		if a > 0:
			print('Y', a, n - a)
		else:
			print('N')


from sys import stdin, stdout
from math import gcd, sqrt
from collections import deque
input = stdin.readline
R = lambda : map(int, input().split())
I = lambda : int(input())
S = lambda : input().rstrip('\n')
L = lambda : list(R())
P = lambda x: stdout.write(x)
hg = lambda x, y: (y + x - 1) // x * x
pw = lambda x: 1 if x == 1 else 1 + pw(x // 2)
chk = lambda x: chk(x // 2) if not x % 2 else True if x == 1 else False
N = 10 ** (-6)
for _ in range(I()):
	n = float(I())
	l = float(0)
	r = float(n)
	lef = rig = -1
	while l <= r:
		m = (l + r) / 2
		if m * (n - m) >= n:
			l = m + 10 ** (-10)
			if abs(n - m * (n - m)) <= N:
				lef = m
				rig = n - m
				break
		else:
			r = m - 10 ** (-10)
	if lef != -1:
		print('Y', lef, rig)
	else:
		print('N')


from math import sqrt
n = int(input())
for i in range(n):
	d = int(input())
	if 0 < d < 4:
		print('N')
	else:
		s = sqrt(d * d - 4 * d)
		print('Y %.9f %.9f' % ((d + s) / 2, (d - s) / 2))


from bisect import bisect_right as br
from bisect import bisect_left as bl
from collections import defaultdict
import sys
MAX = sys.maxsize
MAXN = 10 ** 6 + 10

def isprime(n):
	n = abs(int(n))
	if n < 2:
		return False
	if n == 2:
		return True
	if not n & 1:
		return False
	for x in range(3, int(n ** 0.5) + 1, 2):
		if n % x == 0:
			return False
	return True

def mhd(a, b, x, y):
	return abs(a - x) + abs(b - y)

def numIN():
	return map(int, sys.stdin.readline().strip().split())

def charIN():
	return sys.stdin.readline().strip().split()

def chk(n):
	return n * n - 4 * n >= 0

def ans(n):
	x = (n * n - 4 * n) ** 0.5
	x += n
	x = x / 2
	return x
for _ in range(int(input())):
	d = int(input())
	if d == 0:
		print('Y', 0, 0)
		continue
	if chk(d):
		z = ans(d)
		print('Y', z, d / z)
	else:
		print('N')


t = int(input())
itog = []
for _ in range(t):
	n = int(input())
	if n == 0:
		itog.append(['Y', 0.0, 0.0])
	else:
		l = -1
		r = n + 1
		while l + 1 != r:
			mid = (l + r) // 2
			if mid * (n - mid) >= n:
				r = mid
			else:
				l = mid
		for i in range(100):
			mid = (l + r) / 2
			if mid * (n - mid) > n:
				r = mid
			else:
				l = mid
		if round(l * (n - l)) == n and round(l + (n - l)) == n:
			itog.append(['Y', n - l, l])
		else:
			itog.append(['N'])
for i in itog:
	print(*i)


def find(target, a, b, shift):
	while abs(a * b - (a + b)) >= 10 ** (-6) or a + b - target >= 10 ** (-6):
		if a * b < target:
			a -= shift
			b += shift
		else:
			a += shift
			b -= shift
		shift = shift / 2
	print('Y ', a, ' ', b)
t = int(input())
for i in range(t):
	target = int(input())
	a = target / 2
	b = a
	if abs(a * b - (a + b)) < 10 ** (-6) and a + b - target < 10 ** (-6):
		print('Y ', a, ' ', b)
	elif a * b < target:
		print('N')
	else:
		find(target, target - a / 2, a / 2, target / 8)


import math
t = int(input())
while t > 0:
	t -= 1
	d = int(input())
	if d == 0:
		print('Y', 0, 0)
	elif d * d < 4 * d:
		print('N')
	else:
		x1 = d - math.sqrt(d * d - 4 * d)
		x1 /= 2
		x2 = d + math.sqrt(d * d - 4 * d)
		x2 /= 2
		if x1 < 0:
			x1 = x2
		y1 = x1 / (x1 - 1)
		y2 = x2 / (x2 - 1)
		if y1 < 0:
			y1 = y2
		elif y2 < 0:
			y2 = y1
		if y2 < 0:
			print('N')
		elif abs(x1 + y1 - x1 * y1) <= 1e-06 and abs(d - (x1 + y1)) <= 1e-06:
			print('Y', x1, y1)
		elif abs(x2 + y2 - x2 * y2) <= 1e-06 and abs(d - (x2 + y2)) <= 1e-06:
			print('Y', x2, y2)
		else:
			print('N')


def check(mid, n):
	l = n / mid
	if abs(mid + l - n) <= 10 ** (-6):
		return True
	return False

def f(n):
	hi = n + 1
	lo = 1
	cnt = 0
	res = None
	if n == 0:
		return ('Y', 0, 0)
	while lo <= hi and cnt < 1000:
		mid = (lo + hi) / 2
		if check(mid, n):
			res = mid
		if mid + n / mid > n:
			hi = mid
		else:
			lo = mid
		cnt += 1
	if res == None:
		return ('N', '', '')
	return ('Y', res, n / res)
for _ in range(int(input())):
	print(*f(int(input())))


t = int(input())
for i in range(t):
	d = int(input())
	D = d * d - 4 * d
	if D < 0:
		print('N')
		continue
	print('Y', (d - D ** 0.5) / 2, (d + D ** 0.5) / 2)


for _ in range(int(input())):
	d = int(input())
	if d - 4 < 0 and d != 0:
		print('N')
	else:
		a = (d + (d * (d - 4)) ** 0.5) / 2
		b = d - a
		a = round(a, 9)
		b = round(b, 9)
		k = a + b - a * b
		r = a + b - d
		t = 10 ** (-6)
		if k >= -t and k <= t and (r >= -t) and (r <= t):
			print('Y', end=' ')
			print('%.9f' % a, '%.9f' % b)
		else:
			print('N')


import math

def D(d):
	res = d ** 2 - 4 * d
	if res < 0:
		return -1
	return math.sqrt(res)

def solve():
	d = float(input())
	res = D(d)
	if res == -1:
		print('N')
		return
	a = (d + res) / 2
	b = d - a
	print('Y %.10f %.10f' % (a, b))

def main():
	t = int(input())
	for i in range(t):
		solve()
main()


import sys

def rint():
	return map(int, sys.stdin.readline().split())
t = int(input())
for i in range(t):
	d = int(input())
	r = d ** 2 - 4 * d
	if r < 0:
		print('N')
		continue
	a = (d + r ** 0.5) / 2.0
	b = d - a
	if a <= d and b >= 0:
		print('Y', a, b)
		continue
	a = (d - r ** 0.5) / 2.0
	b = d - a
	if a <= d and b >= 0:
		print('Y', a, b)
		continue
	print('N')


from math import sqrt
for _ in range(int(input())):
	d = int(input())
	dis = d ** 2 - 4 * d
	if dis >= 0:
		disd = sqrt(dis)
		print('Y {} {}'.format((d + disd) / 2, (d - disd) / 2))
	else:
		print('N')


for test in range(int(input())):
	d = int(input())
	delta = d ** 2 - 4 * d
	if delta < 0:
		print('N')
	else:
		x = max((-d + delta ** 0.5) / -2, (-d - delta ** 0.5) / -2)
		if delta == 0:
			x = max(abs(x), d / 2)
		print('Y', '%.9f %.9f' % (x, d - x))


from math import sqrt
t = int(input())
for i in range(t):
	d = float(input())
	if d == 0:
		print('Y 0 0')
	elif d >= 4:
		x1 = (d + sqrt(d * d - 4 * d)) / 2
		x2 = (d - sqrt(d * d - 4 * d)) / 2
		print('Y', x1, x2)
	else:
		print('N')


import math
t = int(input())
for i in range(t):
	d = int(input())
	diskt = d ** 2 - 4 * d
	if diskt < 0:
		print('N')
	else:
		print('Y', '%.10f' % ((d + math.sqrt(diskt)) / 2), '%.10f' % ((d - math.sqrt(diskt)) / 2))


import math

def my_quadratic(a, b, c):
	d = b * b - 4 * a * c
	if d < 0:
		return None
	elif a == 0:
		if b == 0:
			if c == 0:
				return None
			else:
				return None
		else:
			x1 = -c / b
			x2 = x1
			return (x1, x2)
	else:
		x1 = (-b + math.sqrt(d)) / (2 * a)
		x2 = (-b - math.sqrt(d)) / (2 * a)
		return (x1, x2)
num = int(input())
for i in range(num):
	a = int(input())
	ans = my_quadratic(1, -a, a)
	if ans != None:
		print('Y', ans[0], ans[1])
	else:
		print('N')


import math
n = int(input())
for _ in range(n):
	a = 0
	b = 0
	t = int(input())
	if t == 0:
		print('Y', a, b)
	elif t < 4:
		print('N')
	else:
		diff = t ** 2 - t * 4
		diff = math.sqrt(diff)
		a = (t + diff) / 2
		b = (t - diff) / 2
		print('Y', a, b)


for i in range(int(input())):
	d = int(input())
	if d == 0:
		print('Y 0 0')
	elif 1 <= d <= 3:
		print('N')
	else:
		x = (d * d - 4 * d) ** (1 / 2)
		a = (d + x) / 2
		b = (d - x) / 2
		print('Y', a, b)


import math
t = int(input())
for tc in range(t):
	d = int(input())
	a = 1
	b = d
	c = d
	det = b ** 2 - 4 * a * c
	if det == 0:
		root = b / (2 * a)
		print('Y %.9f %.9f' % (root, root))
	elif det < 0:
		print('N')
	else:
		root1 = -(-b + math.sqrt(det)) / (2 * a)
		root2 = -(-b - math.sqrt(det)) / (2 * a)
		print('Y %.9f %.9f' % (root1, root2))


t = int(input())
for _ in range(t):
	n = int(input())
	D = n ** 2 - 4 * n
	if D < 0:
		print('N')
	else:
		D = D ** 0.5
		print(f'Y {(n + D) / 2} {(n - D) / 2}')


t = int(input())
d = []
for i in range(t):
	temp = int(input())
	d.append(temp)
for j in range(t):
	if 0 < d[j] < 4:
		print('N')
	else:
		a = (d[j] + (d[j] ** 2 - 4 * d[j]) ** 0.5) / 2
		b = (d[j] - (d[j] ** 2 - 4 * d[j]) ** 0.5) / 2
		print('Y %.9f %.9f' % (a, b))


from math import sqrt
t = int(input())
for _ in range(t):
	n = int(input())
	if n >= 4:
		x = (n + sqrt(n ** 2 - 4 * n)) / 2
		y = (n - sqrt(n ** 2 - 4 * n)) / 2
		print('Y {:.9f} {:.9f}'.format(x, y))
	elif n == 0:
		print('Y {:.9f} {:.9f}'.format(0, 0))
	else:
		print('N')


from math import sqrt
t = int(input())
d = []
for i in range(t):
	x = int(input())
	d.append(x)
for i in range(t):
	delta = d[i] * (d[i] - 4)
	if delta >= 0:
		a = (d[i] + sqrt(delta)) / 2
		b = (d[i] - sqrt(delta)) / 2
		if a >= 0 and b >= 0:
			print('Y %.9f %.9f' % (a, b))
		else:
			print('N')
	else:
		print('N')


import math

def x(d):
	a = (d + math.sqrt(pow(-d, 2) - 4 * d)) / 2
	b = (d - math.sqrt(pow(-d, 2) - 4 * d)) / 2
	a = '%.9f' % a
	b = '%.9f' % b
	return [a, b]
t = int(input())
for _ in range(t):
	n = int(input())
	if n in [1, 3, 2]:
		print('N')
	else:
		print('Y', *x(n))


def solve(hi, lo):
	for j in range(1000):
		mid = lo + (hi - lo) / 2
		rest = d - mid
		if abs(mid + rest - mid * rest) <= 10 ** (-8) and abs(mid + rest - d) <= 10 ** (-8):
			return 'Y {:.9f} {:.9f}'.format(rest, mid)
		if mid * rest > d:
			hi = mid
		else:
			lo = mid
	return 'N'
for i in range(int(input())):
	d = int(input())
	print(solve(d, 0))


import math
cs = int(input())
i = 1
i = int(i)
while i <= cs:
	x = 0
	y = 0
	x = float(x)
	y = float(y)
	d = float(input())
	if d == 0:
		print('Y 0.000000000 0.000000000')
	elif d > 0 and d < 4.0:
		print('N')
	else:
		x = (--d + math.sqrt(pow(d, 2) - 4.0 * 1.0 * d)) / 2.0
		y = d - x
		print('Y ', x, ' ', y)
	i += 1


from math import *
for _ in range(int(input().strip())):
	n = int(input())
	(a, b, c) = (1, -n, n)
	D = b * b - 4 * a * c
	if D < 0:
		print('N')
		continue
	x = (-b - sqrt(D)) / (2 * a)
	print('Y', x, n - x)


import math
n = int(input())
for i in range(n):
	d = int(input())
	delta = d * d - 4 * d
	if delta < 0:
		print('N')
		continue
	x1 = (-d - math.sqrt(delta)) / -2
	x2 = (-d + math.sqrt(delta)) / -2
	if x1 < 0 and x2 < 0:
		print('N')
		continue
	if x1 < x2:
		x1 = x2
	print('Y', abs(x1), ' ', abs(x2))


import sys
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()


import decimal
from math import *
decimal.Context(prec=20)
c = int(input())
for i in range(c):
	n = int(input())
	n = decimal.Decimal(n)
	if n * n - 4 * n < 0:
		print('N')
	elif n * n - 4 * n == 0:
		print('Y ' + str(int(n / 2)) + '.000000000 ' + str(int(n / 2)) + '.000000000')
	else:
		x1 = (n - decimal.Decimal(sqrt(n * n - decimal.Decimal(4) * n))) / decimal.Decimal(2)
		x2 = (n + decimal.Decimal(sqrt(n * n - decimal.Decimal(4) * n))) / decimal.Decimal(2)
		print('Y', round(x2, 9), round(x1, 9))


l = []
a = 0
from math import sqrt
n = int(input())
for i in range(n):
	l.append(int(input()))
for d in l:
	if d * d - 4 * d < 0:
		print('N', end='\n')
	else:
		a = (d - sqrt(d * d - 4 * d)) / 2
		a1 = (d + sqrt(d * d - 4 * d)) / 2
		b = d - a
		b1 = d - a1
		if d * d - 4 * d < 0:
			print('N\n')
		if abs(a + b - a * b) <= 10 ** (-6) and abs(a + b - d) <= 10 ** (-6):
			print('Y', end=' ')
			print(a, end=' ')
			print(b)
		elif abs(a1 + b1 - a1 * b1) <= 10 ** (-6) and abs(a1 + b1 - d) <= 10 ** (-6):
			print('Y', end=' ')
			print(a1, end=' ')
			print(b1)


import math
t = int(input())
for _ in range(0, t):
	a = int(input())
	z = a * a - 4 * a
	if z >= 0:
		z = math.sqrt(z)
		print('Y', end=' ')
		x = (a + z) / 2
		y = (a - z) / 2
		print('%.9f' % x, end=' ')
		print('%.9f' % y)
	else:
		print('N')


import math, sys, bisect, heapq
from collections import defaultdict, Counter, deque
from itertools import groupby, accumulate
int1 = lambda x: int(x) - 1
ilele = lambda : map(int, input().split())
alele = lambda : list(map(int, input().split()))
ilelec = lambda : map(int1, input().split())
alelec = lambda : list(map(int1, input().split()))

def list2d(a, b, c):
	return [[c] * b for i in range(a)]

def list3d(a, b, c, d):
	return [[[d] * c for j in range(b)] for i in range(a)]

def Y(c):
	print(['NO', 'YES'][c])

def y(c):
	print(['no', 'yes'][c])

def Yy(c):
	print(['No', 'Yes'][c])
for _ in range(int(input())):
	d = int(input())
	if d == 0:
		print('Y', 0, 0)
	elif d < 4:
		print('N')
	else:

		def fun(m):
			a = m
			b = d - m
			return a * b < d
		l = 1e-11
		r = d - l
		for i in range(100):
			m = (l + r) / 2
			if fun(m):
				l = m
			else:
				r = m
		if abs(d - r + r - (d - r) * r) <= 10 ** (-6):
			print('Y', d - r, r)
		else:
			print('N')


def dx(f, x):
	return abs(0 - f(x))

def newtons_method(f, df, x0, e):
	delta = dx(f, x0)
	while delta > e:
		x0 = x0 - f(x0) / df(x0)
		delta = dx(f, x0)
	return x0
for i in range(int(input())):
	d = int(input())
	if d == 0:
		print('Y', 0, 0)
	elif d >= 4:
		a = newtons_method(lambda x: x ** 2 / (x - 1) - d, lambda x: (x - 2) / (x - 1) * x / (x - 1), d, 10 ** (-6))
		print('Y', a, a / (a - 1))
	else:
		print('N')


from math import sqrt

def main():
	t = int(input())
	for i in range(t):
		d = int(input())
		if d * d - 4 * d < 0:
			print('N')
		else:
			diskr = round(sqrt(d * d - 4 * d), 9)
			b = (d + diskr) / 2
			a = d - b
			if a < 0 or b < 0:
				print('N')
			else:
				print('Y', a, b)
main()


n = int(input())
for i in range(n):
	d = int(input())
	if d ** 2 - 4 * d >= 0:
		a = (d + (d ** 2 - 4 * d) ** (1 / 2)) / 2
		b = (d - (d ** 2 - 4 * d) ** (1 / 2)) / 2
		print('Y', end=' ')
		print(a, b)
	else:
		print('N')


import sys
import math
n = int(sys.stdin.readline())
for i in range(0, n):
	val = float(sys.stdin.readline())
	a = val - 2.0
	b = 2.0
	kmax = 1.0
	kmin = 0.0
	found = True
	if abs(val) < 1e-07:
		print('Y 0.000000000 0.000000000')
		continue
	while True:
		m = kmin + (kmax - kmin) / 2.0
		valp = (a + m) * (b - m)
		if abs(valp - val) < 1e-09:
			break
		if valp > val:
			kmin = m
		else:
			kmax = m
		if abs(m - 1.0) < 1e-08 or abs(m) < 1e-09:
			found = False
			break
	if found:
		print('Y ' + str(a + m) + ' ' + str(b - m))
	else:
		print('N')


n = int(input())
for i in range(n):
	v = int(input())
	if v == 1:
		print('N')
	elif v == 0:
		print('Y', 0.0, 0.0)
	else:
		left = 0
		right = v
		while True:
			mid = (left + right) / 2
			left_a = (mid + left) / 2
			right_a = (mid + right) / 2
			left_b1 = v / left_a
			left_b2 = v - left_a
			right_b1 = v / right_a
			right_b2 = v - right_a
			if abs(left_b1 - left_b2) < abs(right_b1 - right_b2):
				if right == mid:
					a = mid
					b = v / mid
					if abs(a + b - a * b) <= 1e-06:
						print('Y', mid, v / mid)
					else:
						print('N')
					break
				right = mid
			else:
				if left == mid:
					a = mid
					b = v / mid
					if abs(a + b - a * b) <= 1e-06:
						print('Y', mid, v / mid)
					else:
						print('N')
					break
				left = mid


import math

def solved(d):
	x = (d + math.sqrt(d ** 2 - 4 * d)) / 2
	y = (d - math.sqrt(d ** 2 - 4 * d)) / 2
	return (round(x, 9), round(y, 9))
for i in range(int(input())):
	d = int(input())
	if d ** 2 - 4 * d < 0:
		print('N')
	else:
		(x, y) = solved(d)
		print('Y', x, y)


import math
t = int(input())
for i in range(t):
	d = int(input())
	a = 1
	b = -d
	c = d
	discr = d ** 2 - 4.0 * 1 * d
	if discr > 0:
		x1 = (-b + math.sqrt(discr)) / (2 * a)
		x2 = (-b - math.sqrt(discr)) / (2 * a)
		print('Y {:.12f} {:.12f}'.format(x1, d - x1))
	elif discr == 0:
		x = -b / (2.0 * a)
		print('Y {:.12f} {:.12f}'.format(x, d - x))
	else:
		print('N')


import math
EPS = 1e-06

def check(a, b, d):
	return math.fabs(a + b - a * b) <= EPS and math.fabs(a + b - d) <= EPS

def solve(d):
	try:
		sqrdelta = math.sqrt(d * (d - 4))
	except ValueError:
		return None
	a1 = (d + sqrdelta) / 2
	a2 = (d - sqrdelta) / 2
	if check(a1, d - a1, d):
		return (a1, d - a1)
	elif check(a2, d - a2, d):
		return (a2, d - a2)
	return None

def main():
	t = int(input())
	for i in range(t):
		d = int(input())
		result = solve(d)
		if result is None:
			print('N')
		else:
			(a, b) = result
			print('Y {:.10f} {:.10f}'.format(a, b))
main()


for _ in range(int(input())):
	d = int(input())
	res = 0
	val = d * d - 4 * d
	if val < 0:
		print('N')
	else:
		val = pow(val, 0.5)
		v1 = d + val
		v2 = d - val
		v1 /= 2
		v2 /= 2
		print('Y', v1, v2)


t = int(input())
for i in range(t):
	d = int(input())
	if d == 0:
		a = 0
		b = 0
		print('Y', end=' ')
		print('{r:10.9f} {p:10.9f}'.format(r=a, p=b))
	elif 0 < d < 4:
		print('N')
	else:
		a = (d + (d * d - 4 * d) ** 0.5) / 2
		b = (d - (d * d - 4 * d) ** 0.5) / 2
		print('Y', end=' ')
		print('{r:10.9f} {p:10.9f}'.format(r=a, p=b))


n = int(input())
for k in range(n):
	c = int(input())
	d = c * c - 4 * c
	if d < 0:
		print('N')
	else:
		b = (c + d ** (1 / 2)) / 2
		a = c - b
		print('Y', b, a)


import math

def main():
	for _ in range(int(input())):
		d = int(input())
		if d * (d - 4) < 0:
			print('N')
			continue
		D = math.sqrt(d * (d - 4))
		a = (d + D) / 2
		b = (d - D) / 2
		print('Y %.15f %0.15f' % (a, b))
main()


T = int(input())
for t in range(T):
	d = int(input())
	if 0 < d < 4:
		print('N')
		continue
	if d == 0:
		print('Y 0.0000000 0.000000')
		continue
	d = float(d)
	(left, right) = (1.0, 2.0)
	for i in range(100):
		mid = (left + right) / 2
		if mid * mid - mid * d + d > 0:
			left = mid
		else:
			right = mid
	print('Y %.10f %.10f' % (left, d - left))


import math
for _ in range(int(input())):
	n = int(input())
	x = n * n - 4 * n
	if x >= 0:
		print('Y', end=' ')
		v = math.pow(x, 0.5)
		x = n + v
		x = x / 2
		print(x, n - x)
	else:
		print('N')


import math
import bisect
import itertools
import sys
mod = 10 ** 9 + 7

def mindiff(a):
	b = a[:]
	b.sort()
	m = 10000000000
	for i in range(len(b) - 1):
		if b[i + 1] - b[i] < m:
			m = b[i + 1] - b[i]
	return m

def lcm(a, b):
	return a * b // math.gcd(a, b)

def merge(a, b):
	i = 0
	j = 0
	c = 0
	ans = []
	while i < len(a) and j < len(b):
		if a[i] < b[j]:
			ans.append(a[i])
			i += 1
		else:
			ans.append(b[j])
			c += len(a) - i
			j += 1
	ans += a[i:]
	ans += b[j:]
	return (ans, c)

def mergesort(a):
	if len(a) == 1:
		return (a, 0)
	mid = len(a) // 2
	(left, left_inversion) = mergesort(a[:mid])
	(right, right_inversion) = mergesort(a[mid:])
	(m, c) = merge(left, right)
	c += left_inversion + right_inversion
	return (m, c)

def is_prime(num):
	if num == 2:
		return True
	if num == 3:
		return True
	if num % 2 == 0:
		return False
	if num % 3 == 0:
		return False
	t = 5
	a = 2
	while t <= int(math.sqrt(num)):
		if num % t == 0:
			return False
		t += a
		a = 6 - a
	return True

def ceil(a, b):
	if a % b == 0:
		return a // b
	else:
		return a // b + 1

def binsearch(arr, b, low, high):
	if low == high:
		return low
	if arr[math.ceil((low + high) / 2)] < b:
		return binsearch(arr, b, low, math.ceil((low + high) / 2) - 1)
	else:
		return binsearch(arr, b, math.ceil((low + high) / 2), high)

def ncr1(n, r):
	s = 1
	for i in range(min(n - r, r)):
		s *= n - i
		s %= mod
		s *= pow(i + 1, mod - 2, mod)
		s %= mod
	return s

def calc(n, m, r):
	s = 0
	for i in range(0, r + 1, 2):
		s += ncr1(n, i) * ncr1(m, i)
		s %= mod
	return s
for _ in range(int(input())):
	d = int(input())
	if d ** 2 - 4 * d < 0:
		print('N')
	else:
		print('Y', (d ** 2 - 4 * d) ** 0.5 / 2 + d / 2, d - (d ** 2 - 4 * d) ** 0.5 / 2 - d / 2)


t = int(input())
from math import sqrt
for q in range(t):
	d = float(input())
	if d * d - 4 * d >= 0:
		a = d + sqrt(d * (d - 4))
		a /= 2
		b = d - a
		print('Y', a, b)
	else:
		print('N')


for _ in range(int(input())):
	d = int(input())
	b = d * d - 4 * d
	if b < 0:
		print('N')
	else:
		x = (d + b ** 0.5) / 2
		y = (d - b ** 0.5) / 2
		if x < 0 or y < 0:
			print('N')
		else:
			print('Y ', x, ' ', y)


import math
for _ in range(int(input())):
	n1 = int(input())
	t3 = math.pow(n1, 2) - 4 * n1
	if t3 < 0:
		print('N')
	else:
		t1 = math.sqrt(t3)
		t2 = n1 - t1
		a = t2 / 2
		b = n1 - a
		print('Y', a, b)


from sys import stdin
from math import sqrt

def main():
	t = int(input())
	for _ in range(t):
		d = int(input())
		p = d ** 2 - 4 * d
		if p < 0:
			print('N')
		else:
			x = sqrt(p) / 2
			c = d / 2
			print('Y', c - x, c + x)
	return
main()


for _ in range(int(input())):
	k = int(input())
	q = k ** 2 - 4 * k
	if q >= 0:
		a = (k + q ** (1 / 2)) / 2
		print('Y', a, k - a)
	else:
		print('N')


import sys, threading
sys.setrecursionlimit(10 ** 6)
for _ in range(int(input())):
	d = int(input())
	D = d * (d - 4)
	if D < 0:
		print('N')
	else:
		D = D ** 0.5
		print('Y', (d + D) / 2, (d - D) / 2)


l = []
for i in range(int(input())):
	n = int(input())
	if n == 0:
		l.append('Y 0 0')
	elif n * n >= 4 * n:
		a = (n + (n ** 2 - 4 * n) ** 0.5) / 2
		b = n / a
		l.append('Y ' + str(a) + ' ' + str(b))
	else:
		l.append('N')
print('\n'.join(l))


import math

def a(d):
	v = d * d - 4 * d
	if v < 0:
		print('N')
	else:
		v = math.sqrt(v)
		a = (d + v) / 2
		b = (d - v) / 2
		print('Y', a, b)
t = int(input())
for i in range(t):
	d = int(input())
	a(d)


from math import sqrt
for _ in range(int(input())):
	d = int(input())
	if d * d - 4 * d < 0:
		print('N')
		continue
	a = (d - sqrt(d * d - 4 * d)) / 2
	b = d - a
	print('Y %.9f %.9f' % (a, b))


for t in range(int(input())):
	d = int(input())
	D = d * (d - 4)
	if D < 0:
		print('N')
	else:
		D = D ** 0.5
		print('Y', (d + D) / 2, (d - D) / 2)


import math
t = int(input())

def func(d):
	D = d ** 2 - 4 * d
	if D < 0:
		return 'N'
	else:
		kD = math.sqrt(D)
		return 'Y {} {}'.format((kD + d) / 2, (d - kD) / 2)
for i in range(t):
	print(func(int(input())))


from math import sqrt

def quad(a, b, c):
	f = (-b + sqrt(b ** 2 - 4 * a * c)) / (2 * a)
	s = (-b - sqrt(b ** 2 - 4 * a * c)) / (2 * a)
	return (f, s)
t = int(input())
for i in range(t):
	d = int(input())
	if d == 0:
		print('Y', '%.9f' % 0, '%.9f' % 0)
	elif d < 4:
		print('N')
	elif d == 4:
		print('Y', '%.9f' % 2, '%.9f' % 2)
	else:
		(a, b) = quad(1, -d, d)
		print('Y', '%.9f' % a, '%.9f' % b)


import math
t = int(input())
for i in range(1, t + 1):
	n = int(input())
	try:
		a = (n + math.sqrt(n * n - 4 * n)) / 2
		b = (n - math.sqrt(n * n - 4 * n)) / 2
		content = 'Y {:.9f} {:.9f}'.format(a, b)
		print(content)
	except ValueError as err:
		print('N')


def fun():
	test = int(input())
	for i in range(test):
		d = int(input())
		if 0 < d < 4:
			print('N')
		else:
			a = (d + (d * d - 4 * d) ** 0.5) / 2
			b = d - a
			print('Y {} {}'.format(a, b))
fun()


import sys
import math
n = sys.stdin.readline()
n = int(n)
for i in range(n):
	q = sys.stdin.readline()
	q = int(q)
	try:
		a = (-q + math.sqrt(q ** 2 - 4 * q)) / -2
		b = q - a
		print('Y', a, b)
	except:
		print('N')


import math
t = int(input())
for _ in range(t):
	d = int(input())
	delta = d * d - 4 * d
	if delta < 0:
		print('N')
	else:
		b = (-d + math.sqrt(delta)) / -2
		a = (-d - math.sqrt(delta)) / -2
		if a >= 0 and b >= 0:
			print('Y', a, b)
		else:
			print('N')


t = int(input())
for _ in range(t):
	d = int(input())
	if d ** 2 / 4 < d:
		print('N')
	elif d ** 2 // 4 == d:
		print('Y', d / 2, d / 2)
	else:
		epsilon = 1e-09
		l = 0
		r = d / 2
		while r - l > epsilon:
			mid = l + (r - l) / 2
			if (d - mid) * mid > d:
				r = mid
			else:
				l = mid
		ans = mid
		print('Y', d - mid, mid)


from math import sqrt
n = int(input())
for i in range(n):
	k = int(input())
	d = k ** 2 - 4 * k
	if d > -1:
		(a, b) = ((k + sqrt(d)) / 2, (k - sqrt(d)) / 2)
		print(f'Y {a} {b}')
	else:
		print('N')


from bisect import insort, bisect_right, bisect_left
from sys import stdout, stdin, setrecursionlimit
from math import sqrt, ceil, floor, factorial, gcd, log2, log10
from io import BytesIO, IOBase
from collections import *
from itertools import *
from random import *
from string import *
from queue import *
from heapq import heappush, heappop, heapify
from re import *
from os import *

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = read(self._fd, max(fstat(self._fd).st_size, 8192))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = read(self._fd, max(fstat(self._fd).st_size, 8192))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(stdin, stdout) = (IOWrapper(stdin), IOWrapper(stdout))
(graph, mod, szzz) = ({}, 10 ** 9 + 7, lambda : sorted(zzz()))

def getStr():
	return input()

def getInt():
	return int(input())

def listStr():
	return list(input())

def getStrs():
	return input().split()

def isInt(s):
	return '0' <= s[0] <= '9'

def input():
	return stdin.readline().strip()

def zzz():
	return [int(i) for i in input().split()]

def output(answer, end='\n'):
	stdout.write(str(answer) + end)

def lcd(xnum1, xnum2):
	return xnum1 * xnum2 // gcd(xnum1, xnum2)

def getPrimes(N=10 ** 5):
	SN = int(sqrt(N))
	sieve = [i for i in range(N + 1)]
	sieve[1] = 0
	for i in sieve:
		if i > SN:
			break
		if i == 0:
			continue
		for j in range(2 * i, N + 1, i):
			sieve[j] = 0
	prime = [i for i in range(N + 1) if sieve[i] != 0]
	return prime

def primeFactor(n, prime=getPrimes()):
	lst = []
	mx = int(sqrt(n)) + 1
	for i in prime:
		if i > mx:
			break
		while n % i == 0:
			lst.append(i)
			n //= i
	if n > 1:
		lst.append(n)
	return lst
dx = [-1, 1, 0, 0, 1, -1, 1, -1]
dy = [0, 0, 1, -1, 1, -1, -1, 1]
daysInMounth = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31]
num = getInt()
for _ in range(num):
	d = getInt()
	mid = d * d - 4 * d
	if d < 0:
		print('N')
		continue
	v1 = (d + mid ** 0.5) / 2
	v2 = (d - mid ** 0.5) / 2
	try:
		if v2 < 0 or v1 < 0:
			print('N')
			continue
		print('Y', v1, v2)
	except:
		print('N')


testCases = int(input())
for i in range(testCases):
	d = int(input())
	determinant = d * (d - 4)
	if determinant < 0:
		print('N')
	else:
		root1 = (d + determinant ** 0.5) / 2
		root2 = (d - determinant ** 0.5) / 2
		print('Y %.10f %.10f' % (root1, root2))


from math import sqrt

def isPos(a):
	if a ** 2 - 4 * a >= 0:
		return True
	return False
n = int(input())
for _ in range(n):
	k = int(input())
	if isPos(k):
		if k == 0:
			print('Y', 0, 0)
			continue
		a = (k + sqrt(k ** 2 - 4 * k)) / (2.0 * k)
		b = (k - sqrt(k ** 2 - 4 * k)) / (2.0 * k)
		print('Y', a * k, b * k)
	else:
		print('N')


from sys import stdin, stdout
from math import sqrt
from decimal import Decimal

def main():
	for _ in range(int(stdin.readline())):
		d = int(stdin.readline())
		try:
			D = sqrt(d ** 2 - 4 * d)
		except:
			stdout.write('%s\n' % 'N')
		else:
			ans = ('Y', str((d + D) / 2), str((d - D) / 2))
			stdout.write('%s %s %s\n' % (ans[0], ans[1], ans[2]))
main()


import os
import sys
from io import BytesIO, IOBase
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')
for i in range(int(input())):
	n = int(input())
	d = n
	n = n * n - 4 * n
	if n < 0:
		print('N')
	else:
		n = n ** 0.5
		a = (d - n) / 2
		b = (d + n) / 2
		print('Y', a, b)


for _ in range(int(input())):
	n = int(input())
	l = 0
	h = n / 2
	for _ in range(100):
		m = (l + h) / 2
		if m * (n - m) <= n:
			l = m
		else:
			h = m
	print('Y', m, n - m) if round(m * (n - m)) == n else print('N')


from sys import stdin
from collections import deque
mod = 10 ** 9 + 7
import sys
sys.setrecursionlimit(10 ** 5)
from queue import PriorityQueue
from bisect import bisect_right
from bisect import bisect_left
from collections import defaultdict
from math import sqrt, factorial, gcd, log2, inf, ceil
import heapq
input = lambda : sys.stdin.readline().rstrip()
from sys import stdin, stdout
from heapq import heapify, heappush, heappop
t = int(input())
for _ in range(t):
	d = int(input())
	if d ** 2 - 4 * d >= 0:
		a = d + sqrt(d ** 2 - 4 * d)
		b = d - sqrt(d ** 2 - 4 * d)
		a /= 2
		b /= 2
		print('Y', a, b)
	else:
		print('N')
		continue


t = int(input())
for test in range(t):
	d = int(input())
	if d == 0:
		print('Y', 0, 0)
	elif d >= 4:
		print('Y', (d + (d * (d - 4)) ** 0.5) / 2, (d - (d * (d - 4)) ** 0.5) / 2)
	else:
		print('N')


def solve():
	d = int(input())
	if d ** 2 - 4 * d < 0:
		print('N')
	else:
		print('Y', (d + (d ** 2 - 4 * d) ** (1 / 2)) / 2, (d - (d ** 2 - 4 * d) ** (1 / 2)) / 2)
for i in range(int(input())):
	solve()


t = int(input())
cal = lambda x: '{} {} {}'.format('Y', (x + (x * (x - 4)) ** 0.5) / 2, (x - (x * (x - 4)) ** 0.5) / 2)
for i in range(t):
	x = int(input())
	print('N' if 0 < x < 4 else cal(x))


from sys import stdin, stdout
from math import *

def main():
	nTests = int(stdin.readline())
	for test in range(nTests):
		d = float(stdin.readline())
		delta = d * d - d * 4
		if delta < 0:
			stdout.write('N\n')
			continue
		a = (d + sqrt(delta)) / 2
		b = (d - sqrt(delta)) / 2
		if min(a, b) < 0:
			stdout.write('N\n')
			continue
		else:
			stdout.write('Y ' + str(a) + ' ' + str(b) + '\n')
	return 0
main()


import math
T = int(input())
for index in range(0, T):
	d = int(input())
	a = 1
	b = -1 * d
	c = d
	D = b * b - 4 * a * c
	if D < 0:
		print('N')
	else:
		x1 = (-b + math.sqrt(b ** 2 - 4 * (a * c))) / (2 * a)
		x2 = (-b - math.sqrt(b ** 2 - 4 * (a * c))) / (2 * a)
		print('Y', x1, x2)


import math
t = int(input())
while t:
	x = int(input())
	if x == 0:
		a = str.format('{0:.9f}', 0)
		b = str.format('{0:.9f}', 0)
		print('Y', a, b)
	elif x < 4:
		print('N')
	else:
		a = (math.sqrt(x ** 2 - 4 * x) + x) / 2
		b = (x - math.sqrt(x ** 2 - 4 * x)) / 2
		a = str.format('{0:.9f}', a)
		b = str.format('{0:.9f}', b)
		print('Y', a, b)
	t -= 1


for _ in ' ' * int(input()):
	c = int(input())
	k = (c + (c ** 2 - 4 * c) ** 0.5) / 2
	try:
		print('Y', round(k, 12), round(c - k, 12))
	except:
		print('N')