#include <bits/stdc++.h>
using namespace std;
int main() {
  int a, b, m, vx, vy, vz;
  cin >> a >> b >> m;
  cin >> vx >> vy >> vz;
  double t = (-1.0 * m) / vy;
  double z = (double)vz * t / 1.0;
  int zz = (int)(z / b);
  z = (z) - (double)zz * b;
  if (zz % 2 == 1) {
    z = (double)(b - z);
  }
  double x = a / 2.0;
  double dx = vx * t * 1.0;
  x += dx;
  int xx = (int)(x / a);
  x = (x) - (double)xx * a * 1.0;
  if (x < 0) {
    x = -1.0 * x;
  }
  if (xx % 2 == 1 || xx % 2 == -1) {
    x = (double)(a - x);
  }
  cout << setprecision(12) << x << " " << z;
  return 0;
}
