#include <bits/stdc++.h>
using namespace std;
const int di[] = {-1, 0, 1, 0};
const int dj[] = {0, 1, 0, -1};
const long long MOD = 1e9 + 7;
const long long INF = 1e10;
const double EPS = 1e-10;
struct point {
  double x = 0, y = 0, z = 0;
  point() {}
  point(double x, double y, double z) {
    this->x = x;
    this->y = y;
    this->z = x;
  }
};
int a, b;
point move(point p, point v, double t) {
  p.x += v.x * t;
  p.y += v.y * t;
  p.z += v.z * t;
  return p;
}
bool inside(point p, point v, double t) {
  p = move(p, v, t);
  return p.x >= 0 && p.x <= a && p.y >= 0 && p.z >= 0 && p.z <= b;
}
bool onPlane(point p, point v, double t) {
  p = move(p, v, t);
  return inside(p, p, 0) &&
         (p.x >= 0 && p.x <= EPS || p.x == a || p.y >= 0 && p.y <= EPS ||
          p.z >= 0 && p.z <= EPS || p.z == b);
}
point bs(point p, point v) {
  double low = 0, high = 10000, mid = (low + high) / 2.0;
  for (int i = 0; i < 1000; ++i) {
    if (inside(p, v, mid))
      low = mid;
    else
      high = mid;
    mid = (low + high) / 2.0;
  }
  if (!inside(p, v, mid)) mid = low;
  return move(p, v, mid);
}
point reflect(point p, point v) {
  if (p.x >= 0 && p.x <= EPS || abs(p.x - a) <= EPS) v.x = -v.x;
  if (p.z >= 0 && p.z <= EPS || abs(p.z - b) <= EPS) v.z = -v.z;
  return v;
}
int main() {
  ios::sync_with_stdio(false), cin.tie(0);
  point p, v;
  cin >> a >> b >> p.y;
  cin >> v.x >> v.y >> v.z;
  p.x = a / 2.0, p.z = 0;
  for (int i = 0; i < 100000 && p.y > EPS; ++i) {
    p = bs(p, v);
    v = reflect(p, v);
  }
  cout << fixed << setprecision(10) << p.x << " " << p.z << endl;
}
