Problem: Try guessing the statement from this picture: 

<image>

You are given a non-negative integer d. You have to find two non-negative real numbers a and b such that a + b = d and a ⋅ b = d.

Input

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

Each test case contains one integer d (0 ≤ d ≤ 10^3).

Output

For each test print one line.

If there is an answer for the i-th test, print "Y", and then the numbers a and b.

If there is no answer for the i-th test, print "N".

Your answer will be considered correct if |(a + b) - a ⋅ b| ≤ 10^{-6} and |(a + b) - d| ≤ 10^{-6}.

Example

Input


7
69
0
1
4
5
999
1000


Output


Y 67.985071301 1.014928699
Y 0.000000000 0.000000000
N
Y 2.000000000 2.000000000
Y 3.618033989 1.381966011
Y 997.998996990 1.001003010
Y 998.998997995 1.001002005

Solution (in CPP):

Solution:
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ld = long double;
template <typename T>
inline T LCM(T a, T b) {
  return (a * b) / GCD(a, b);
}
template <typename T>
inline T GCD(T a, T b) {
  ll t;
  while (a) {
    t = a;
    a = b % a;
    b = t;
  }
  return b;
}
template <typename T>
inline string toString(T a) {
  return to_string(a);
}
template <typename T>
inline void toInt(string s, T &x) {
  stringstream str(s);
  str >> x;
}
inline ll add(ll x, ll y) {
  x += y;
  if (x >= 1000000007) x -= 1000000007;
  return x;
}
inline ll sub(ll x, ll y) {
  x -= y;
  if (x < 0) x += 1000000007;
  return x;
}
inline ll mul(ll x, ll y) {
  return ((x % 1000000007) * (y % 1000000007)) % 1000000007;
}
inline ll powr(ll a, ll b) {
  ll x = 1LL;
  while (b) {
    if (b & 1) x = mul(x, a);
    a = mul(a, a);
    b >>= 1;
  }
  return x;
}
inline ll inv(ll a) { return powr(a, 1000000007 - 2); }
const int inv2 = (1000000007 + 1) >> 1;
const ll INF = 999999999999999999;
const int inf = 999999999;
bool check(ll n) {
  if (n == 1) return 0;
  if (n == 2 or n == 3) return 1;
  if (n % 2 == 0 or n % 3 == 0) return 0;
  for (ll i = 5; i * i <= n; i += 6)
    if (n % i == 0 or n % (i + 2) == 0) return 0;
  return 1;
}
int main() {
  ios_base::sync_with_stdio(false), cin.tie(NULL);
  int t;
  cin >> t;
  while (t--) {
    ll n;
    cin >> n;
    double d = n * 1.0;
    double low = 0.0, high = d * 1.0;
    bool flag = 0;
    double a1 = -1, b1 = -1;
    ;
    for (int i = 0; i <= 200; i++) {
      double b = (low + high) * 0.5;
      double a = d - b;
      if (abs(a * b - d) <= 1e-9) {
        a1 = a;
        b1 = b;
        flag = 1;
        break;
      } else if ((a * b - d) > 1e-9) {
        low = b;
      } else {
        high = b;
      }
    }
    if (flag) {
      cout << fixed << setprecision(9);
      cout << "Y " << a1 << " " << b1, cout << "\n";
    } else {
      cout << "N ", cout << "\n";
    }
  }
  return 0;
}