#include <bits/stdc++.h>
using namespace std;
mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
long long power(long long a, long long n) {
  a %= 1000000007;
  if (n == 1) return a;
  if (n == 0) return 1;
  if (n % 2)
    return (a * (power((a * a) % 1000000007, n / 2) % 1000000007)) % 1000000007;
  return power((a * a) % 1000000007, n / 2) % 1000000007;
}
const long long inf = (long long)1e18;
long long inverse(long long x) { return power(x, 1000000007 - 2) % 1000000007; }
void solve() {
  long long n;
  cin >> n;
  vector<double> x(n + 5), y(n + 5), z(n + 5);
  for (long long i = 1; i < n + 2; ++i) cin >> x[i] >> y[i] >> z[i];
  double vp, vs, px, py, pz, pt = 0.0;
  cin >> vp >> vs >> px >> py >> pz;
  double lo = 0, hi = 1, x1, y1, z1, t1, t2;
  for (long long i = 1; i < n + 1; ++i) {
    lo = 0, hi = 1;
    for (long long j = 0; j < 100; ++j) {
      double mid = (lo + hi) / 2;
      x1 = x[i] + mid * (x[i + 1] - x[i]);
      y1 = y[i] + mid * (y[i + 1] - y[i]);
      z1 = z[i] + mid * (z[i + 1] - z[i]);
      t1 = sqrt((px - x1) * (px - x1) + (py - y1) * (py - y1) +
                (pz - z1) * (pz - z1)) /
           vp;
      t2 = sqrt((x[i] - x1) * (x[i] - x1) + (y[i] - y1) * (y[i] - y1) +
                (z[i] - z1) * (z[i] - z1)) /
               vs +
           pt;
      if (t1 <= t2)
        hi = mid;
      else
        lo = mid;
    }
    if (t1 <= t2 + 1e-8) {
      cout << "YES\n";
      cout << fixed << setprecision(10);
      cout << t1 << "\n";
      cout << x1 << " " << y1 << " " << z1 << "\n";
      return;
    }
    pt = t2;
  }
  cout << "NO\n";
}
signed main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  ;
  long long T = 1;
  for (long long t = 1; t < T + 1; ++t) {
    solve();
  }
  return 0;
}
