#include <bits/stdc++.h>
#pragma GCC optimize("Ofast")
#pragma GCC target("sse4")
#pragma GCC optimize("unroll-loops")
using namespace std;
int main() {
  long double a, b, m, vx, vy, vz, x, z, t;
  int k;
  cin >> a >> b >> m >> vx >> vy >> vz;
  t = m / (-vy);
  x = abs(vx) * t;
  if (x < a / 2)
    x += a / 2;
  else {
    x -= a / 2;
    k = 0;
    while (x > a) {
      k++;
      x -= a;
    }
    if (k % 2 == 0) x = a - x;
  }
  if (vx < 0) x = a - x;
  z = abs(vz) * t;
  k = 0;
  while (z > b) {
    k++;
    z -= b;
  }
  if (k % 2) z = b - z;
  cout << fixed << setprecision(8) << x << " " << z;
  return 0;
}
