Problem: The fearless Ikta has finally hunted down the infamous Count Big Bridge! Count Bigbridge is now trapped in a rectangular room w meters wide and h meters deep, waiting for his end.

If you select a corner of the room and take the coordinate system so that the width direction is the x-axis and the depth direction is the y-axis, and the inside of the room is in the positive direction, Count Big Bridge is at the point (p, q). .. At point (x, y), there is a shock wave launcher, which is Ikta's ultimate weapon, from which a shock wave of v meters per second is emitted in all directions. This shock wave is valid for t seconds and is reflected off the walls of the room.

Ikta, who is outside the room, wants to know how much Count Big Bridge will suffer, so let's write a program that asks Count Big Bridge how many shock waves he will hit. At this time, if the shock wave hits the enemy from the n direction at the same time, it is considered to have hit the enemy n times, and it is also effective if the shock wave hits the enemy exactly t seconds later. The shock wave does not disappear due to obstacles such as the launcher itself and Count Big Bridge, and the shock waves do not interfere with each other.



Input

The input is given in the following format.

> w h v t x y p q
>

* Each is a positive integer as explained in the problem statement.



Constraints

* v × t ≤ 106
* 2 ≤ w, h ≤ 108
* 0 <x, p <w
* 0 <y, q <h
* (x, y) ≠ (p, q)

Output

Output the number of times the shock wave hits Count Big Bridge on one line.

Examples

Input

10 10 1 10 3 3 7 7


Output

1


Input

10 10 1 11 3 3 7 7


Output

5


Input

2 3 1000 1000 1 1 1 2


Output

523598775681

Solution (in JAVA):

Solution:
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.text.DecimalFormat;
import java.util.Comparator;
import java.util.PriorityQueue;

public class Main {
	static boolean debug = true;

	public static void main(String[] args) throws IOException {

		UserScanner scan = new UserScanner(System.in);
		PrintWriter pwriter = new PrintWriter(System.out);

		int w = scan.nextInt();
		int h = scan.nextInt();
		int v = scan.nextInt();
		int t = scan.nextInt();
		int x = scan.nextInt();
		int y = scan.nextInt();
		int p = scan.nextInt();
		int q = scan.nextInt();
		Wave wave = new Wave(w, h, v, t, x, y, p, q);
		pwriter.println(wave.attack());

		pwriter.flush();

		scan.close();
		System.exit(0);
	}
}

class Wave {
	int w, h, v, t, x, y, p, q;

	public Wave(int w, int h, int v, int t, int x, int y, int p, int q) {
		this.w = w;
		this.h = h;
		this.v = v;
		this.t = t;
		this.x = x;
		this.y = y;
		this.p = p;
		this.q = q;
	}

	public long attack() {
		int maxW, maxH;

		double maxDist = v * t;
		maxDist = maxDist * maxDist;

		for (maxW = 0; getPowDistance(maxW, 0) <= maxDist; maxW++)
			;
		if (maxW == 0)
			return 0;

		long ans = maxW;
		int w = maxW - 1;
		for (int h = 1; w >= 0; h++)
			if (getPowDistance(w, h) <= maxDist)
				ans += (w + 1);
			else
				for (w = w - 1; w >= 0; w--)
					if (getPowDistance(w, h) <= maxDist) {
						ans += (w + 1);
						break;
					}

		w = maxW - 1;
		for (int h = -1; w >= 0; h--)
			if (getPowDistance(w, h) <= maxDist)
				ans += (w + 1);
			else
				for (w = w - 1; w >= 0; w--)
					if (getPowDistance(w, h) <= maxDist) {
						ans += (w + 1);
						break;
					}

		w = -maxW;
		for (int h = 0; w < 0; h++)
			if (getPowDistance(w, h) <= maxDist)
				ans -= w;
			else
				for (w = w + 1; w < 0; w++)
					if (getPowDistance(w, h) <= maxDist) {
						ans -= w;
						break;
					}
		
		w = -maxW;
		for (int h = -1; w < 0; h--)
			if (getPowDistance(w, h) <= maxDist)
				ans -= w;
			else
				for (w = w + 1; w < 0; w++)
					if (getPowDistance(w, h) <= maxDist) {
						ans -= w;
						break;
					}
		return ans;
	}

	private double getPowDistance(int mx, int my) {
		// get reflected wave distance as powered
		//
		// mx=0,my=0 direct
		// mx=1,my=0 reflect right wall at once
		// ... equal to the distance between (2w-p,q) and (x,y)
		// mx=2,my=0 reflect right wall at once and left wall at once
		// ... equal to the distance between (2w+p,q) and (x,y)
		// mx=3,my=0 reflect right,left,right
		// ... equal to the distance between (4w-p,q) and (x,y)
		// mx=k,my=0 if k is even (k*w + p, q) else (k*w + w - p, q)
		// ... it can apply to negative k
		//
		// mx=0,my=l if l is even (p, l*h + q) else (p, l*h + h - q)
		// ... mx=k,my=l if k and l are even (k*w + p, l*h + q) ...
		double wp = 0, wq = 0;

		if (mx % 2 == 0)
			wp = mx * w + p;
		else
			wp = mx * w + w - p;

		if (my % 2 == 0)
			wq = my * h + q;
		else
			wq = my * h + h - q;

		wp -= x;
		wq -= y;
		return wp * wp + wq * wq;
	}

}

class UserScanner {
	private InputStream in;
	private final byte[] buffer = new byte[1024];
	private int ptr = 0;
	private int buflen = 0;

	public UserScanner(InputStream inStream) {
		in = inStream;
	}

	private void read() {
		ptr = 0;
		try {
			buflen = in.read(buffer);
		} catch (IOException e) {
			e.printStackTrace();
			System.exit(9);
		}
	}

	private byte getByte() {
		if (ptr >= buflen)
			read();
		if (buflen < 0 || isCtlSpace(buffer[ptr])) {
			return -1;
		} else
			return buffer[ptr++];
	}

	private void skipCtlSpace() {
		for (; ptr < buflen; ptr++)
			if (!isCtlSpace(buffer[ptr]))
				return;
		read();
		skipCtlSpace();
	}

	private boolean isCtlSpace(byte b) {
		if (b <= ' ' || b > '~')
			return true;
		else
			return false;
	}

	public void close() {
		try {
			in.close();
		} catch (IOException e) {
			e.printStackTrace();
			System.exit(9);
		}
	}

	public String next() {
		skipCtlSpace();
		StringBuilder sb = new StringBuilder();
		byte b;
		while ((b = getByte()) != -1) {
			sb.appendCodePoint(b);
		}
		return sb.toString();
	}

	public int nextInt() {
		skipCtlSpace();
		int n = 0;
		boolean minus = false;
		byte b;
		while ((b = getByte()) != -1) {
			if (b == '-')
				minus = true;
			else {
				n *= 10;
				n += (b - '0');
			}
		}
		if (minus)
			return n * -1;
		else
			return n;
	}
}