#include <bits/stdc++.h>
using namespace std;
double vp, vs, px, py, pz;
double dist(double x1, double y1, double z1, double x2, double y2, double z2) {
  return sqrt((x1 - x2) * (x1 - x2) + (y1 - y2) * (y1 - y2) +
              (z1 - z2) * (z1 - z2));
}
bool potterCan(double t, double x, double y, double z) {
  double d = dist(x, y, z, px, py, pz);
  double tp = d / vp;
  if (tp > t + 1e-13) return false;
  return true;
}
int main() {
  int n, xi, yi, zi, vsi, vpi;
  double x[1 << 14], y[1 << 14], z[1 << 14];
  scanf("%d", &n);
  int i, j;
  for (i = 0; i <= n; ++i) {
    scanf("%d %d %d", &xi, &yi, &zi);
    x[i] = xi;
    y[i] = yi;
    z[i] = zi;
  }
  scanf("%d %d", &vpi, &vsi);
  scanf("%d %d %d", &xi, &yi, &zi);
  vs = vsi;
  vp = vpi;
  px = xi;
  py = yi;
  pz = zi;
  double curt = 0;
  double t;
  for (i = 0; i < n; ++i) {
    double d = dist(x[i], y[i], z[i], x[i + 1], y[i + 1], z[i + 1]);
    t = d / vs;
    if (potterCan(curt + t, x[i + 1], y[i + 1], z[i + 1])) break;
    curt += t;
  }
  if (i == n) {
    cout << "NO" << endl;
    return 0;
  }
  double s, e, m;
  s = 0;
  e = t;
  double dx, dy, dz;
  dx = (x[i + 1] - x[i]) / t;
  dy = (y[i + 1] - y[i]) / t;
  dz = (z[i + 1] - z[i]) / t;
  for (j = 0; j < 200; ++j) {
    m = (s + e) / 2.0;
    if (potterCan(curt + m, x[i] + dx * m, y[i] + dy * m, z[i] + dz * m))
      e = m;
    else
      s = m;
  }
  printf("YES\n");
  printf("%.10lf\n", curt + s);
  printf("%.10lf %.10lf %.10lf", x[i] + dx * s, y[i] + dy * s, z[i] + dz * s);
  return 0;
}
