#include <bits/stdc++.h>
using namespace std;
signed main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  double a, b, m;
  cin >> a >> b >> m;
  double vx, vy, vz, xn, yn, zn, t, fz, fx, dx, dz;
  cin >> vx >> vy >> vz;
  long long int kx, kz;
  t = abs(m / vy);
  dx = abs(vx * t);
  dz = vz * t;
  if (vx >= 0)
    fx = dx + a / 2;
  else
    fx = a / 2 - dx;
  fz = dz;
  if (dx > a / 2 && vx >= 0) {
    dx -= a / 2;
    kx = dx / a;
    fx = dx - kx * a;
    if (kx % 2 == 0) fx = a - fx;
  } else if (dx > a / 2 && vx < 0) {
    dx -= a / 2;
    kx = dx / a;
    fx = dx - kx * a;
    if (kx % 2 == 1) fx = a - fx;
  }
  kz = dz / b;
  fz = dz - kz * b;
  if (kz % 2 == 1) fz = b - fz;
  cout << fixed << setprecision(9) << fx << " ";
  cout << fixed << setprecision(9) << fz << "\n";
}
