#include <bits/stdc++.h>
using namespace std;
const long double eps = 1e-8;
struct point {
  long double x, y, z;
  void scan() { scanf("%Lf%Lf%Lf", &x, &y, &z); }
  point operator+(const point &B) const {
    return (point){x + B.x, y + B.y, z + B.z};
  }
  point operator-(const point &B) const {
    return (point){x - B.x, y - B.y, z - B.z};
  }
  point operator*(const long double &b) const {
    return (point){x * b, y * b, z * b};
  }
  long double dist() { return sqrt(x * x + y * y + z * z); }
} p[10005], P;
int n;
long double vs, vp, T;
int main() {
  scanf("%d", &n);
  for (int i = 1; i <= n + 1; i++) p[i].scan();
  scanf("%Lf%Lf", &vp, &vs);
  P.scan();
  for (int i = 1; i <= n; i++) {
    long double t = (p[i + 1] - p[i]).dist() / vs;
    long double l = 0, r = t + 100;
    for (int k = 0; k <= 230; k++) {
      long double mid = (l + r) / 2;
      if (vp * (mid + T) + eps >
          ((p[i + 1] - p[i]) * (mid / t) + p[i] - P).dist())
        r = mid;
      else
        l = mid;
    }
    if (r < t + eps) {
      P = (p[i + 1] - p[i]) * (r / t) + p[i];
      puts("YES");
      printf("%.9Lf\n%.9Lf %.9Lf %.9Lf\n", r + T, P.x, P.y, P.z);
      return 0;
    }
    T += t;
  }
  puts("NO");
}
