Problem: When Valera was playing football on a stadium, it suddenly began to rain. Valera hid in the corridor under the grandstand not to get wet. However, the desire to play was so great that he decided to train his hitting the ball right in this corridor. Valera went back far enough, put the ball and hit it. The ball bounced off the walls, the ceiling and the floor corridor and finally hit the exit door. As the ball was wet, it left a spot on the door. Now Valera wants to know the coordinates for this spot.

Let's describe the event more formally. The ball will be considered a point in space. The door of the corridor will be considered a rectangle located on plane xOz, such that the lower left corner of the door is located at point (0, 0, 0), and the upper right corner is located at point (a, 0, b) . The corridor will be considered as a rectangular parallelepiped, infinite in the direction of increasing coordinates of y. In this corridor the floor will be considered as plane xOy, and the ceiling as plane, parallel to xOy and passing through point (a, 0, b). We will also assume that one of the walls is plane yOz, and the other wall is plane, parallel to yOz and passing through point (a, 0, b).

We'll say that the ball hit the door when its coordinate y was equal to 0. Thus the coordinates of the spot are point (x0, 0, z0), where 0 ≤ x0 ≤ a, 0 ≤ z0 ≤ b. To hit the ball, Valera steps away from the door at distance m and puts the ball in the center of the corridor at point <image>. After the hit the ball flies at speed (vx, vy, vz). This means that if the ball has coordinates (x, y, z), then after one second it will have coordinates (x + vx, y + vy, z + vz).

See image in notes for clarification.

When the ball collides with the ceiling, the floor or a wall of the corridor, it bounces off in accordance with the laws of reflection (the angle of incidence equals the angle of reflection). In the problem we consider the ideal physical model, so we can assume that there is no air resistance, friction force, or any loss of energy.

Input

The first line contains three space-separated integers a, b, m (1 ≤ a, b, m ≤ 100). The first two integers specify point (a, 0, b), through which the ceiling and one of the corridor walls pass. The third integer is the distance at which Valera went away from the door.

The second line has three space-separated integers vx, vy, vz (|vx|, |vy|, |vz| ≤ 100, vy < 0, vz ≥ 0) — the speed of the ball after the hit.

It is guaranteed that the ball hits the door.

Output

Print two real numbers x0, z0 — the x and z coordinates of point (x0, 0, z0), at which the ball hits the exit door. The answer will be considered correct, if its absolute or relative error does not exceed 10  - 6.

Examples

Input

7 2 11
3 -11 2


Output

6.5000000000 2.0000000000


Input

7 2 11
4 -3 3


Output

4.1666666667 1.0000000000

Note

<image>

Solution (in JAVA):

Solution:
import java.awt.Point;
import java.io.*;
import java.math.BigInteger;
import java.util.*;
import static java.lang.Math.*;

public class D {

	final boolean ONLINE_JUDGE = System.getProperty("ONLINE_JUDGE") != null;
	BufferedReader in;
	PrintWriter out;
	StringTokenizer tok = new StringTokenizer("");

	void init() throws FileNotFoundException {
		if (ONLINE_JUDGE) {
			in = new BufferedReader(new InputStreamReader(System.in));
			out = new PrintWriter(System.out);
		} else {
			in = new BufferedReader(new FileReader("input.txt"));
			out = new PrintWriter("output.txt");
		}
	}

	String readString() throws IOException {
		while (!tok.hasMoreTokens()) {
			tok = new StringTokenizer(in.readLine());
		}
		return tok.nextToken();
	}

	int readInt() throws IOException {
		return Integer.parseInt(readString());
	}

	long readLong() throws IOException {
		return Long.parseLong(readString());
	}

	double readDouble() throws IOException {
		return Double.parseDouble(readString());
	}

	int[] readArr(int n) throws IOException {
		int[] res = new int[n];
		for (int i = 0; i < n; i++) {
			res[i] = readInt();
		}
		return res;
	}

	long[] readArrL(int n) throws IOException {
		long[] res = new long[n];
		for (int i = 0; i < n; i++) {
			res[i] = readLong();
		}
		return res;
	}

	public static void main(String[] args) {
		new D().run();
	}

	public void run() {
		try {
			long t1 = System.currentTimeMillis();
			init();
			solve();
			out.close();
			long t2 = System.currentTimeMillis();
			System.err.println("Time = " + (t2 - t1));
		} catch (Exception e) {
			e.printStackTrace(System.err);
			System.exit(-1);
		}
	}

	void solve() throws Exception {
		double a = readInt();
		double b = readInt();
		double m = readInt();
		double vx = readDouble();
		double vy = readDouble();
		double vz = readDouble();
		double x = a * 1.0 / 2;
		double y = m;
		double z = 0;
		while (true) {
			double tmin = 10000000;
			int r = 0;
			if (vx > 0) {
				double curT = (a - x) / vx;
				if (tmin > curT) {
					r = 1;
					tmin = curT;
				}
			} else if(vx != 0){
				double curT = -x / vx;
				if (tmin > curT) {
					r = 1;
					tmin = curT;
				}
			}

			if (vy > 0) {
				throw new Exception();
			} else {
				tmin = min(tmin, -y / vy);
			}

			if (vz > 0) {
				double curT = (b - z) / vz;
				if (tmin > curT) {
					r = 2;
					tmin = curT;
				}
			} else if(vz != 0){
				double curT = -z / vz;
				if (tmin > curT) {
					r = 2;
					tmin = curT;
				}
			}
			x = x + tmin * vx;
			y = y + tmin * vy;
			z = z + tmin * vz;
			if(x < 0 && r!=1) x = 0.00000001;
			if(x > a && r!=1) x = a-0.00000001;
			if(z < 0.0000001 && r!=2) z = 0.00000001;
			if(z > b&& r!=2) z = b - 0.00000001;
			
			if (abs(y) < 0.0000001 || y < 0) {
				break;
			}

			
			if(r == 1) vx = -vx;
			if(r == 2) vz = -vz;
		}
		out.println(x + " " + z);
	}

	void maxHepify(int[] a, int i, int length) {
		int l = (i << 1) + 1;
		int r = (i << 1) + 2;
		int largest = i;
		if (l < length && a[l] > a[largest])
			largest = l;
		if (r < length && a[r] > a[largest])
			largest = r;
		if (largest != i) {
			a[largest] += a[i];
			a[i] = a[largest] - a[i];
			a[largest] -= a[i];
			maxHepify(a, largest, length);
		}
	}

	void buildMaxHeap(int[] a) {
		for (int i = a.length / 2 - 1; i >= 0; i--) {
			maxHepify(a, i, a.length);
		}
	}

	void heapSort(int[] a) {
		buildMaxHeap(a);
		for (int i = a.length - 1; i > 0; i--) {
			a[i] += a[0];
			a[0] = a[i] - a[0];
			a[i] -= a[0];
			maxHepify(a, 0, i);
		}
	}

	int[] zFunction(char[] s) {
		int[] z = new int[s.length];
		z[0] = 0;
		for (int i = 1, l = 0, r = 0; i < s.length; ++i) {
			if (i <= r)
				z[i] = min(r - i + 1, z[i - l]);
			while (i + z[i] < s.length && s[z[i]] == s[i + z[i]])
				++z[i];
			if (i + z[i] - 1 > r) {
				l = i;
				r = i + z[i] - 1;
			}
		}
		return z;
	}

	int[] prefixFunction(char[] s) {
		int[] pr = new int[s.length];
		for (int i = 1; i < s.length; ++i) {
			int j = pr[i - 1];
			while (j > 0 && s[i] != s[j])
				j = pr[j - 1];
			if (s[i] == s[j])
				++j;
			pr[i] = j;
		}
		return pr;
	}

	int ModExp(int a, int n, int mod) {
		int res = 1;
		while (n != 0)
			if ((n & 1) != 0) {
				res = (res * a) % mod;
				--n;
			} else {
				a = (a * a) % mod;
				n >>= 1;
			}
		return res;
	}

	public static class Utils {

		private Utils() {
		}

		public static void mergeSort(int[] a) {
			mergeSort(a, 0, a.length - 1);
		}

		private static void mergeSort(int[] a, int leftIndex, int rightIndex) {
			final int MAGIC_VALUE = 50;
			if (leftIndex < rightIndex) {
				if (rightIndex - leftIndex <= MAGIC_VALUE) {
					insertionSort(a, leftIndex, rightIndex);
				} else {
					int middleIndex = (leftIndex + rightIndex) / 2;
					mergeSort(a, leftIndex, middleIndex);
					mergeSort(a, middleIndex + 1, rightIndex);
					merge(a, leftIndex, middleIndex, rightIndex);
				}
			}
		}

		private static void merge(int[] a, int leftIndex, int middleIndex,
				int rightIndex) {
			int length1 = middleIndex - leftIndex + 1;
			int length2 = rightIndex - middleIndex;
			int[] leftArray = new int[length1];
			int[] rightArray = new int[length2];
			System.arraycopy(a, leftIndex, leftArray, 0, length1);
			System.arraycopy(a, middleIndex + 1, rightArray, 0, length2);
			for (int k = leftIndex, i = 0, j = 0; k <= rightIndex; k++) {
				if (i == length1) {
					a[k] = rightArray[j++];
				} else if (j == length2) {
					a[k] = leftArray[i++];
				} else {
					a[k] = leftArray[i] <= rightArray[j] ? leftArray[i++]
							: rightArray[j++];
				}
			}
		}

		private static void insertionSort(int[] a, int leftIndex, int rightIndex) {
			for (int i = leftIndex + 1; i <= rightIndex; i++) {
				int current = a[i];
				int j = i - 1;
				while (j >= leftIndex && a[j] > current) {
					a[j + 1] = a[j];
					j--;
				}
				a[j + 1] = current;
			}
		}
	}

	boolean isPrime(int a) {
		for (int i = 2; i <= sqrt(a); i++)
			if (a % i == 0)
				return false;
		return true;
	}

	static double distance(long x1, long y1, long x2, long y2) {
		return Math.sqrt((x1 - x2) * (x1 - x2) + (y1 - y2) * (y1 - y2));
	}

	static long gcd(long a, long b) {
		if (min(a, b) == 0)
			return max(a, b);
		return gcd(max(a, b) % min(a, b), min(a, b));
	}

	static long lcm(long a, long b) {
		return a * b / gcd(a, b);
	}
}

/*
 * class Treap<K extends Comparable<K>>{
 * 
 * public K x; public double y; public Treap<K> left; public Treap<K> right;
 * 
 * public Treap(K x, double y, Treap<K> left, Treap<K> right) { this.x = x;
 * this.y = y; this.left = left; this.right = right; }
 * 
 * public static <K extends Comparable<K>> Treap<K> merge(Treap<K> l, Treap<K>
 * r){ if(l == null) return r; if(r == null) return l; if(l.y > r.y){ return new
 * Treap<K>(l.x, l.y, l.left, merge(l.right, r)); } else{ return new
 * Treap<K>(r.x, r.y, merge(l, r.left), r.right); } }
 * 
 * public void split(K x, Treap<K> left, Treap<K> right){ Treap<K> newTreap =
 * null; if(this.x.compareTo(x) <= 0){ if(this.right == null){ right = null; }
 * else{ right.split(x, newTreap, right); } left = new Treap<K>(this.x, this.y,
 * left, newTreap); } else{ if(this.left == null){ left = null; } else{
 * left.split(x, left, newTreap); } right = new Treap<K>(x, y, newTreap, right);
 * } }
 * 
 * public Treap<K> add(K x){ Treap<K> left = null, right = null; this.split(x,
 * left, right); Treap<K> temp = new Treap<K>(x, random(), null, null); return
 * merge(merge(left, temp), right); }
 * 
 * @SuppressWarnings("null") public Treap<K> remove(K x){ Treap<K> left = null,
 * temp = null, right = null; this.split(x, left, right); right.split(x, temp,
 * right); return merge(left, right); }
 * 
 * public static <K extends Comparable<K>> Treap<K> build(K[] a){ Treap<K> temp
 * = new Treap<K>(a[0], random(), null, null); for(int i = 1; i < a.length;
 * i++){ temp = temp.add(a[i]); } return temp; } }
 */