#include <bits/stdc++.h>
using namespace std;
double x, y, z, a, b, p, q, r, tx, ty, tz;
int main() {
  cin >> a >> b >> y >> p >> q >> r;
  x = a / 2.0;
  z = 0.0;
  while (fabs(y) > 0.000001) {
    if (fabs(p) < 0.000001)
      tx = 10000000000000.0;
    else if (p > 0)
      tx = (a - x) / p;
    else
      tx = x / (-p);
    ty = y / (-q);
    if (fabs(r) < 0.000001)
      tz = 10000000000000.0;
    else if (r > 0)
      tz = (b - z) / r;
    else
      tz = z / (-r);
    if ((tx < ty) && (tx < tz)) {
      x += tx * p;
      y += tx * q;
      z += tx * r;
      p = -p;
    } else if (tz < ty) {
      x += tz * p;
      y += tz * q;
      z += tz * r;
      r = -r;
    } else {
      x += ty * p;
      y += ty * q;
      z += ty * r;
    }
  }
  printf("%.15lf %.15lf\n", x, z);
  return 0;
}
