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.BufferedReader;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.Comparator;
import java.util.HashMap;
import java.util.HashSet;
import java.util.LinkedList;
import java.util.List;
import java.util.PriorityQueue;
import java.util.Random;
import java.util.Scanner;
import java.util.Stack;
import java.util.StringTokenizer;
import java.util.TreeMap;
import java.util.TreeSet;
import java.lang.Long;
import java.math.BigDecimal;
import java.math.BigInteger;

/**
 * Problem statement: http://codeforces.com/problemset/problem/431/D
 * 
 * @author thepham
 * 
 */

public class D_Round_128_Div2 {
	static long Mod = 1000000007;
	static int num = 0;
	static int[] index, low;

	public static void main(String[] args) throws FileNotFoundException {
		// PrintWriter out = new PrintWriter(new FileOutputStream(new File(
		// "output.txt")));
		PrintWriter out = new PrintWriter(System.out);
		Scanner in = new Scanner();

		int a = in.nextInt();
		int b = in.nextInt();
		int n = in.nextInt();
		int[] v = new int[3];
		for (int i = 0; i < 3; i++) {
			v[i] = in.nextInt();
		}
		P start = new P((double) a / 2, n, 0);
		while (start.p[1] > 1e-9) {
			double[] time = new double[3];
			double min = Double.MAX_VALUE;
			for (int i = 0; i < 3; i++) {
				if (v[i] > 0) {
					if (i == 0) {
						time[0] = (a - start.p[0]) / v[i];
					} else if (i == 2) {
						time[2] = (b - start.p[2]) / v[i];
					} else {
						time[1] = Double.MAX_VALUE;
					}
				} else if (v[i] < 0) {

					time[i] = (-start.p[i]) / v[i];
				} else {
					time[i] = Double.MAX_VALUE;
				}
				min = Math.min(min, time[i]);
			}
			for (int i = 0; i < 3; i++) {
				start.p[i] += min * v[i];
				if (start.p[i] <= 1e-9) {
					v[i] = -v[i];
				}else if(i == 0 && Math.abs(start.p[i] - a) <= 1e-9){
					v[i] = -v[i];
				}else if(i == 2 && Math.abs(start.p[i] - b ) <= 1e-9){
					v[i] = -v[i];
				}
			}

		}
		out.println(start.p[0] + " " + start.p[2]);
		out.close();
	}

	static class P {
		double[] p = new double[3];

		public P(double x, double y, double z) {
			super();
			p[0] = x;
			p[1] = y;
			p[2] = z;
		}

	}

	public static int getMax(int a, int n, int i, ArrayList<Integer>[] map,
			Point[] data) {
		int[] check = new int[n];
		LinkedList<Integer> q = new LinkedList();
		check[a] = 0;
		q.add(a);
		int max = a;

		while (!q.isEmpty()) {
			int node = q.removeFirst();
			for (int j : map[node]) {
				if (j != i) {
					int nxt = data[j].x == node ? data[j].y : data[j].x;
					if (check[nxt] == 0 && nxt != a) {
						check[nxt] = check[node] + 1;
						if (check[nxt] > check[max]) {
							max = nxt;
						}
						q.add(nxt);
					}
				}
			}
		}
		q.add(max);
		check = new int[n];
		int other = max;
		while (!q.isEmpty()) {
			int node = q.removeFirst();
			for (int j : map[node]) {
				if (j != i) {
					int nxt = data[j].x == node ? data[j].y : data[j].x;
					if (check[nxt] == 0 && nxt != max) {
						check[nxt] = check[node] + 1;
						if (check[nxt] > check[other]) {
							other = nxt;
						}
						q.add(nxt);
					}
				}
			}
		}
		return check[other];
	}

	public static int get(int node, int[] union) {
		if (node != union[node]) {
			return union[node] = get(union[node], union);
		}
		return node;
	}

	public static int[] buildKMP(String val) {
		int[] data = new int[val.length() + 1];
		int i = 0;
		int j = -1;
		data[0] = -1;
		while (i < val.length()) {
			while (j >= 0 && val.charAt(i) != val.charAt(j)) {
				j = data[j];
			}
			i++;
			j++;

			data[i] = j;
			// System.out.println(val + " " + i + " " + data[i]);
		}
		return data;
	}

	static int find(int index, int[] u) {
		if (u[index] != index) {
			return u[index] = find(u[index], u);
		}
		return index;
	}

	static int crossProduct(Point a, Point b) {
		return a.x * b.y + a.y * b.x;
	}

	static long squareDist(Point a) {
		long x = a.x;
		long y = a.y;
		return x * x + y * y;
	}

	static Point minus(Point a, Point b) {
		return new Point(a.x - b.x, a.y - b.y);
	}

	public static boolean nextPer(int[] data) {
		int i = data.length - 1;
		while (i > 0 && data[i] < data[i - 1]) {
			i--;
		}
		if (i == 0) {
			return false;
		}
		int j = data.length - 1;
		while (data[j] < data[i - 1]) {
			j--;
		}
		int temp = data[i - 1];
		data[i - 1] = data[j];
		data[j] = temp;
		Arrays.sort(data, i, data.length);
		return true;
	}

	static class Point {
		int x, y;

		public Point(int x, int y) {
			super();
			this.x = x;
			this.y = y;
		}

		public String toString() {
			return "{" + x + " " + y + "}";
		}

		@Override
		public int hashCode() {
			final int prime = 31;
			int result = 1;
			result = prime * result + x;
			result = prime * result + y;
			return result;
		}

		@Override
		public boolean equals(Object obj) {
			if (this == obj)
				return true;
			if (obj == null)
				return false;
			if (getClass() != obj.getClass())
				return false;
			Point other = (Point) obj;
			if (x != other.x)
				return false;
			if (y != other.y)
				return false;
			return true;
		}

	}

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

	public static class FT {

		int[] data;

		FT(int n) {
			data = new int[n];
		}

		public void update(int index, int value) {
			while (index < data.length) {
				data[index] += value;
				index += (index & (-index));
			}
		}

		public int get(int index) {
			int result = 0;
			while (index > 0) {
				result += data[index];
				index -= (index & (-index));
			}
			return result;

		}
	}

	static class Scanner {

		BufferedReader br;
		StringTokenizer st;

		public Scanner() throws FileNotFoundException {
			// System.setOut(new PrintStream(new
			// BufferedOutputStream(System.out), true));
			br = new BufferedReader(new InputStreamReader(System.in));
			// br = new BufferedReader(new InputStreamReader(new
			// FileInputStream(
			// new File("input.txt"))));
		}

		public String next() {

			while (st == null || !st.hasMoreTokens()) {
				try {
					st = new StringTokenizer(br.readLine());
				} catch (Exception e) {
					throw new RuntimeException();
				}
			}
			return st.nextToken();
		}

		public long nextLong() {
			return Long.parseLong(next());
		}

		public int nextInt() {
			return Integer.parseInt(next());
		}

		public double nextDouble() {
			return Double.parseDouble(next());
		}

		public String nextLine() {
			st = null;
			try {
				return br.readLine();
			} catch (Exception e) {
				throw new RuntimeException();
			}
		}

		public boolean endLine() {
			try {
				String next = br.readLine();
				while (next != null && next.trim().isEmpty()) {
					next = br.readLine();
				}
				if (next == null) {
					return true;
				}
				st = new StringTokenizer(next);
				return st.hasMoreTokens();
			} catch (Exception e) {
				throw new RuntimeException();
			}
		}
	}

}