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.io.*;
import java.util.*;
import static java.lang.Math.*;
import static java.util.Arrays.*;
import static java.util.Collections.*;

public class D implements Runnable {

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

	public static void main(String[] args) {
		new Thread(null, new D(), "", 256 * (1L << 20)).start();
	}

	@Override
	public void run() {
		try {
			long startTime = System.currentTimeMillis();
			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");
			}
			Locale.setDefault(Locale.US);
			tok = new StringTokenizer("");
			solve();
			in.close();
			out.close();
			long freeMemory = Runtime.getRuntime().freeMemory();
			long totalMemory = Runtime.getRuntime().totalMemory();
			long endTime = System.currentTimeMillis();
			System.err.println("Time = " + (endTime - startTime));
			System.err.println("Memory = " + ((totalMemory - freeMemory) >> 10));
		} catch (Throwable t) {
			t.printStackTrace(System.err);
			System.exit(-1);
		}
	}

	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());
	}
	
	void debug(Object... o) {
		if (!ONLINE_JUDGE) {
			System.err.println(Arrays.deepToString(o));
		}
	}

	static class Utils {

		private Utils() {}

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

		private static final int MAGIC_VALUE = 50;

		private static void mergeSort(int[] a, int leftIndex, int rightIndex) {
			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;
			}
		}

	}

	// solution
	
	long gcd(long a, long b) {
		return b == 0 ? a : gcd(b, a % b);
	}
	
	class Fraction implements Comparable<Fraction> {
		long x,y;

		public Fraction(long x, long y) {
			this.x = x;
			this.y = y;
			norm();
		}
		
		public Fraction(long x) {
			this.x = x;
			this.y = 1;
			norm();
		}

		private void norm() {
			long g = gcd(x, y);
			x /= g;
			y /= g;
			if (y < 0) {
				x = -x;
				y = -y;
			}
		}
		
		Fraction add(Fraction f) {
			long up = x*f.y + y*f.x;
			long down = y*f.y;
			return new Fraction(up, down);
		}
		
		Fraction subtract(Fraction f) {
			long up = x*f.y - y*f.x;
			long down = y*f.y;
			return new Fraction(up, down);
		}
		
		Fraction multiply(Fraction f) {
			long up = x*f.x;
			long down = y*f.y;
			return new Fraction(up, down);
		}
		
		Fraction divide(Fraction f) {
			long up = x*f.y;
			long down = y*f.x;
			return new Fraction(up, down);
		}
		
		long floor() {
			return x / y * y;
		}
		
		long ceil() {
			return (x + y - 1) / y * y;
		}

		Fraction real() {
			return this.subtract(new Fraction(floor()));
		}
		
		double doubleValue() {
			return (x + 0.0) / (y + 0.0);
		}
		
		@Override
		public boolean equals(Object obj) {
			Fraction f = (Fraction)obj;
			return x == f.x && y == f.y;
		}

		@Override
		public int compareTo(Fraction o) {
			Fraction diff = this.subtract(o);
			if (diff.x == 0) return 0;
			return diff.x < 0 ? -1 : 1;
		}
		
		@Override
		public String toString() {
			return String.format("%d/%d", x, y);
		}
	}
	
	void solve() throws IOException {
		Fraction a = new Fraction(readLong());
		Fraction b = new Fraction(readLong());
		Fraction m = new Fraction(readLong());
		Fraction vx = new Fraction(readLong());
		Fraction vy = new Fraction(abs(readLong()));
		Fraction vz = new Fraction(readLong());
		Fraction t = m.divide(vy);
		Fraction x0 = a.divide(new Fraction(2));
		Fraction x = x0.add(t.multiply(vx));
		Fraction z0 = new Fraction(0);
		Fraction z = z0.add(t.multiply(vz));
		out.printf("%.15f %.15f", get(t, x0, x, vx, a), get(t, z0, z, vz, b));
	}

	private double get(Fraction t, Fraction x0, Fraction x, Fraction vx, Fraction a) {
		if (vx.x == 0) {
			return x0.doubleValue();
		}
		if (x.compareTo(new Fraction(0)) >= 0 && x.compareTo(a) <= 0) {
			return x.doubleValue();
		}
		boolean inc = vx.x > 0;
		vx.x = abs(vx.x);
		Fraction cur = new Fraction(x0.x, x0.y);
		if (inc) {
			t = t.subtract(a.subtract(cur).divide(vx));
			cur = a;
			inc = false;
		} else {
			t = t.subtract(cur.divide(vx));
			cur = new Fraction(0);
			inc = true;
		}
		Fraction oneTime = a.divide(vx);
		while (true) {
			if (t.subtract(oneTime).compareTo(new Fraction(0)) < 0) {
				if (inc) {
					Fraction res = t.multiply(vx);
					return res.doubleValue();
				} else {
					Fraction res = a.subtract(t.multiply(vx));
					return res.doubleValue();
				}
			} else {
				cur = a.subtract(cur);
				t = t.subtract(oneTime);
				inc ^= true;
			}
		}
	}

}