------
## 最终结论
```python
import math

def find_a_b(d):
    if d == 0:
        return (0.0, 0.0)
    elif d == 1:
        return None
    else:
        # Calculate the discriminant
        discriminant = d * d - 4 * d
        if discriminant < 0:
            return None
        else:
            sqrt_discriminant = math.sqrt(discriminant)
            a = (d + sqrt_discriminant) / 2
            b = (d - sqrt_discriminant) / 2
            return (a, b)

t = int(input())
for _ in range(t):
    d = int(input())
    result = find_a_b(d)
    if result is None:
        print("N")
    else:
        a, b = result
        print(f"Y {a:.9f} {b:.9f}")
```