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>
const int LIM = 2e5 + 5;
using namespace std;
vector<bool> prime;
void SieveOfEratosthenes(long long n) {
  prime.assign(n + 1, 1);
  for (long long p = 2; p * p <= n; p++) {
    if (prime[p] == true) {
      for (long long i = p * p; i <= n; i += p) prime[i] = false;
    }
  }
}
bool isPrime(long long n) {
  if (n < 2) return false;
  for (long long i = 2; i * i <= n; i++)
    if (n % i == 0) return false;
  return true;
}
std::vector<long long> generatePrimeFactors(long long n) {
  std::vector<long long> prime;
  for (long long i = 2; i * i <= n; i++) {
    if (n % i == 0) {
      prime.push_back(i);
      while (n % i == 0) n = n / i;
    }
  }
  if (n != 1) prime.push_back(n);
  return prime;
}
map<long long, long long> generatePrimeFactorization(long long n) {
  map<long long, long long> cnt;
  for (long long i = 2; i * i <= n; i++) {
    while (n && n % i == 0) {
      n /= i;
      cnt[i]++;
    }
  }
  if (n != 1) cnt[n]++;
  return cnt;
}
std::vector<long long> generateFactors(long long n) {
  std::vector<long long> fact;
  for (long long i = 2; i * i <= n; i++) {
    if (n % i == 0) {
      fact.push_back(i);
      if (n / i != i) fact.push_back(n / i);
    }
  }
  if (n != 1) fact.push_back(n);
  sort(fact.begin(), fact.end());
  return fact;
}
long long extendedGCD(long long a, long long b, long long &x, long long &y) {
  if (a == 0) {
    x = 0;
    y = 1;
    return b;
  }
  long long x1, y1, d;
  d = extendedGCD(b % a, a, x1, y1);
  x = y1 - (b / a) * x1;
  y = x1;
  return d;
}
long long gcd(long long a, long long b) {
  while (b) {
    a %= b;
    swap(a, b);
  }
  return a;
}
long long multiply(long long a, long long b, long long m);
long long singlemod(long long a, long long m);
long long modpow(long long x, long long n, long long m) {
  if (n == 0) return 1;
  long long res = 1;
  while (n) {
    if (n % 2) res = multiply(res, x, m);
    x = multiply(x, x, m);
    n = n >> 1;
  }
  return singlemod(res, m);
}
long long fastpow(long long x, long long n) {
  if (n == 0) return 1;
  long long res = 1;
  while (n) {
    if (n % 2) res = res * x;
    x = x * x;
    n = n >> 1;
  }
  return res;
}
long long modinverse(long long x, long long m) { return modpow(x, m - 2, m); }
long long add(long long a, long long b, long long m) {
  return (((a % m) + (b % m)) % m);
}
long long substract(long long a, long long b, long long m) {
  return (((a % m) - (b % m) + m) % m);
}
long long multiply(long long a, long long b, long long m) {
  return (((a % m) * (b % m)) % m);
}
long long divide(long long a, long long b, long long m) {
  long long temp = modinverse(b, m);
  return multiply(a, temp, m);
}
long long singlemod(long long a, long long m) { return (((a % m) + m) % m); }
long long eulerstotientfunction(long long n) {
  long long ans = n;
  for (long long i = 2; i * i <= n; i++) {
    if (n % i == 0) {
      while (n % i == 0) n = n / i;
      ans -= ans / i;
    }
  }
  if (n > 1) ans -= ans / n;
  return ans;
}
long long ncr(long long n, long long k, long long m) {
  if (k > n) return 0;
  if (m == 0) {
    long long res = 1;
    k = min(k, n - k);
    for (long long i = 1; i <= k; i++) {
      res *= (n - i + 1);
      res /= i;
    }
    return res;
  } else {
    long long res = 1;
    k = min(k, n - k);
    for (long long i = 1; i <= k; i++) {
      res = multiply(res, n - i + 1, m);
      res = divide(res, i, m);
    }
    return singlemod(res, m);
  }
}
template <class T>
void printVector(const std::vector<T> arr) {
  for (auto i : arr) cout << i << " ";
  cout << '\n';
}
template <class T>
void printArray(T arr[], long long n) {
  for (long long i = 0; i < n; i++) cout << arr[i] << " ";
  cout << '\n';
}
template <class T>
void printUGraph(vector<T> arr[], long long n) {
  for (long long i = 0; i < n; i++) {
    cout << i << " : ";
    for (auto j : arr[i]) cout << j << " ";
    cout << '\n';
  }
}
template <class T>
void printWGraph(vector<T> arr[], long long n) {
  for (long long i = 0; i < n; i++) {
    cout << i << " : ";
    for (auto j : arr[i]) cout << j.fi << "," << j.se << " ";
    cout << '\n';
  }
}
const int N = 1e5 + 5;
int32_t main() {
  ios_base::sync_with_stdio(false), cin.tie(NULL), cout.tie(NULL);
  int tc;
  cin >> tc;
  while (tc--) {
    long long n;
    cin >> n;
    cout << fixed << setprecision(10);
    if (n == 0)
      cout << "Y 0 0" << '\n';
    else if (n >= 4)
      cout << "Y"
           << " " << (n + sqrt(n * n - 4 * n)) / 2 << " "
           << (n - sqrt(n * n - 4 * n)) / 2 << '\n';
    else {
      cout << "N" << '\n';
    }
  }
  return 0;
}