#include <bits/stdc++.h>
using namespace std;
template <typename T, typename U>
inline void smin(T &a, U b) {
  if (a > b) a = b;
}
template <typename T, typename U>
inline void smax(T &a, U b) {
  if (a < b) a = b;
}
struct point {
  double first, second;
  point(double first = 0, double second = 0) : first(first), second(second) {}
  point operator-(point a) { return point(first - a.first, second - a.second); }
  point operator+(point a) { return point(first + a.first, second + a.second); }
  point operator*(double a) { return point(first * a, second * a); }
  point operator/(double a) { return point(first / a, second / a); }
  point operator&(point a) {
    return point(first * a.first - second * a.second,
                 first * a.second + second * a.first);
  }
  point rotate(double al) { return *this & point(cos(al), sin(al)); }
  double operator^(point a) { return first * a.second - second * a.first; }
  double operator*(point a) { return first * a.first + second * a.second; }
  point norm() {
    double s = nor();
    if (s < 1e-8) return *this;
    return point(first / s, second / s);
  }
  point conj() { return point(-second, first); }
  double nor() { return sqrt(*this * *this); }
  double al() { return atan2(second, first); }
  bool operator<(const point &a) const {
    if (fabs(first - a.first) > 1e-8) return first < a.first;
    return second < a.second - 1e-8;
  }
  bool operator>(const point &a) const {
    if (fabs(first - a.first) > 1e-8) return first > a.first;
    return second > a.second + 1e-8;
  }
  bool operator==(const point &a) const {
    if (fabs(first - a.first) > 1e-8) return 0;
    return fabs(second - a.second) < 1e-8;
  }
  bool operator!=(const point &a) const {
    if (*this == a) return false;
    return true;
  }
  void input() { scanf("%lf %lf", &first, &second); }
  void print() { printf("%.9lf %.9lf\n", first, second); }
};
point a, aa, b;
double m, second;
int main() {
  aa.input();
  scanf("%lf", &m);
  scanf("%lf%lf%lf", &b.first, &second, &b.second);
  second = -second;
  a = point(aa.first / 2, 0);
  a = a + b * (m / second);
  int t = floor(a.first / aa.first);
  int r = floor(a.second / aa.second);
  if (t % 2 == 0)
    printf("%.9lf ", a.first - t * aa.first);
  else
    printf("%.9lf ", (t + 1) * aa.first - a.first);
  if (r % 2 == 0)
    printf("%.9lf\n", a.second - r * aa.second);
  else
    printf("%.9lf\n", (r + 1) * aa.second - a.second);
  return 0;
}
