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;
template <class T>
T gcdExtended(T a, T b, T *x, T *y);
template <class T>
T modInverse(T b, T m);
template <class T>
T gcd(T a, T b);
template <class T, class S>
void init(T *arr, S n, T ele);
template <class T, class S>
void print(T *arr, S n);
template <class T>
void SieveE(int n, bool prime[]);
class Graph {
 public:
  vector<int> *arr;
  int *vertices;
  int size;
  long numOfEdges;
  Graph(int n) {
    arr = new vector<int>[n];
    vertices = new int[n];
    size = n;
    numOfEdges = 0;
  }
  void add_edge(int a, int b) {
    arr[a].push_back(b);
    arr[b].push_back(a);
    numOfEdges++;
  }
  void depthFirstSearch() {
    init(vertices, size, 0);
    for (int i = 0; i < size; i++)
      if (vertices[i] == 0) dfs(i);
  }
  void dfs(int n) {
    vertices[n] = 1;
    for (int i = 0; i < arr[n].size(); i++)
      if (vertices[arr[n][i]] == 0) dfs(arr[n][i]);
  }
  void BreadthFirstSearch(int v) {
    long dist[size];
    int parent[size];
    init(dist, size, numOfEdges + 1);
    init(vertices, size, 0);
    init(parent, size, -1);
    dist[v] = 0;
    vertices[v] = 1;
    queue<int> Q;
    Q.push(v);
    while (!Q.empty()) {
      int current = Q.front();
      Q.pop();
      for (int i = 0; i < arr[current].size(); i++) {
        int w = arr[current][i];
        if (vertices[w] == 0) {
          vertices[w] = 1;
          dist[w] = dist[current] + 1;
          parent[w] = current;
          Q.push(w);
        }
      }
    }
    print(dist, size);
    print(parent, size);
  }
  void print_adjacencyList() {
    for (int i = 0; i < size; i++) {
      cout << i << ": ";
      for (int j = 0; j < arr[i].size(); j++) cout << arr[i][j] << " ";
      cout << "\n";
    }
  }
};
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  int t;
  cin >> t;
  while (t--) {
    long double d;
    cin >> d;
    if (d * d >= 4 * d)
      cout << "Y ";
    else {
      cout << "N\n";
      continue;
    }
    long double a = (d + (long double)sqrt(d * d - 4 * d)) / (long double)2.0;
    long double b = (d - (long double)sqrt(d * d - 4 * d)) / (long double)2.0;
    cout << std::setprecision(15) << a << " " << std::setprecision(15) << b
         << "\n";
  }
  return 0;
}
template <class T, class S>
void init(T *arr, S n, T ele) {
  for (S i = 0; i < n; i++) arr[i] = ele;
}
template <class T, class S>
void print(T *arr, S n) {
  for (S i = 0; i < n; i++) cout << arr[i] << " ";
  cout << "\n";
}
template <class T>
T gcd(T a, T b) {
  if (a % b == 0) return b;
  return gcd(b, a % b);
}
template <class T>
T modInverse(T b, T m) {
  T x, y;
  T g = gcdExtended(b, m, &x, &y);
  if (g != 1) return -1;
  return (x % m + m) % m;
}
template <class T>
T gcdExtended(T a, T b, T *x, T *y) {
  if (a == 0) {
    *x = 0, *y = 1;
    return b;
  }
  T x1, y1;
  T gcd = gcdExtended(b % a, a, &x1, &y1);
  *x = y1 - (b / a) * x1;
  *y = x1;
  return gcd;
}
template <class T>
void SieveE(int n, bool prime[]) {
  for (int p = 2; p * p <= n; p++) {
    if (prime[p] == true) {
      for (int i = p * p; i <= n; i += p) prime[i] = false;
    }
  }
}