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 CPP):

Solution:
#include <stdio.h>

#pragma warning(disable : 4996)

int w, h, v, t, x, y, p, q;

long long r;

bool check(int x1, int y1)
{
	long long distances = 1LL * (x1 - x) * (x1 - x) + 1LL * (y1 - y) * (y1 - y);

	return distances <= r;
}

long long solve()
{
	if (!check(p, q))
	{
		return 0;
	}

	long long ret = 0;


	// ------ 1st. ------ //

	int l1 = -20000000 / w;
	int r1 = 0;

	while (r1 - l1 > 1)
	{
		int m1 = (l1 + r1) / 2;

		if (check(2LL * w * m1 + p, q))
		{
			r1 = m1;
		}
		else
		{
			l1 = m1;
		}
	}

	int l2 = 0;
	int r2 = 20000000 / w;

	while (r2 - l2 > 1)
	{
		int m2 = (l2 + r2) / 2;

		if (check(2LL * w * m2 + p, q))
		{
			l2 = m2;
		}
		else
		{
			r2 = m2;
		}
	}

	for (int i = r1; i < r2; i++)
	{
		int xs = 2LL * w * i + p;


		// ------ 1st. ------ //

		int l5 = -20000000 / h;
		int r5 = 0;

		while (r5 - l5 > 1)
		{
			int m5 = (l5 + r5) / 2;

			if (check(xs, 2LL * h * m5 + q))
			{
				r5 = m5;
			}
			else
			{
				l5 = m5;
			}
		}

		int l6 = 0;
		int r6 = 20000000 / h;

		while (r6 - l6 > 1)
		{
			int m6 = (l6 + r6) / 2;

			if (check(xs, 2LL * h * m6 + q))
			{
				l6 = m6;
			}
			else
			{
				r6 = m6;
			}
		}

		if (r6 - r5 <= 100)
		{
			for (int i = r5; i < r6; i++)
			{
				ret += check(xs, 2LL * h * i + q) ? 1 : 0;
			}
		}
		else
		{
			ret += r6 - r5;
		}


		// ------ 2nd. ------ //

		int l7 = -20000000 / h;
		int r7 = 0;

		while (r7 - l7 > 1)
		{
			int m7 = (l7 + r7) / 2;

			if (check(xs, 2LL * h * m7 - q))
			{
				r7 = m7;
			}
			else
			{
				l7 = m7;
			}
		}

		int l8 = 0;
		int r8 = 20000000 / h;

		while (r8 - l8 > 1)
		{
			int m8 = (l8 + r8) / 2;

			if (check(xs, 2LL * h * m8 - q))
			{
				l8 = m8;
			}
			else
			{
				r8 = m8;
			}
		}

		if (r8 - r7 <= 100)
		{
			for (int i = r7; i < r8; i++)
			{
				ret += check(xs, 2LL * h * i - q) ? 1 : 0;
			}
		}
		else
		{
			ret += r8 - r7;
		}
	}


	// ------ 2nd. ------ //

	int l3 = -20000000 / h;
	int r3 = 0;

	while (r3 - l3 > 1)
	{
		int m3 = (l3 + r3) / 2;

		if (check(2LL * w * m3 - p, q))
		{
			r3 = m3;
		}
		else
		{
			l3 = m3;
		}
	}

	int l4 = 0;
	int r4 = 20000000 / h;

	while (r4 - l4 > 1)
	{
		int m4 = (l4 + r4) / 2;

		if (check(2LL * w * m4 - p, q))
		{
			l4 = m4;
		}
		else
		{
			r4 = m4;
		}
	}

	for (int i = r3; i < r4; i++)
	{
		int xs = 2LL * w * i - p;


		// ------ 1st. ------ //

		int l5 = -20000000 / h;
		int r5 = 0;

		while (r5 - l5 > 1)
		{
			int m5 = (l5 + r5) / 2;

			if (check(xs, 2LL * h * m5 + q))
			{
				r5 = m5;
			}
			else
			{
				l5 = m5;
			}
		}

		int l6 = 0;
		int r6 = 20000000 / h;

		while (r6 - l6 > 1)
		{
			int m6 = (l6 + r6) / 2;

			if (check(xs, 2LL * h * m6 + q))
			{
				l6 = m6;
			}
			else
			{
				r6 = m6;
			}
		}

		if (r6 - r5 <= 100)
		{
			for (int i = r5; i < r6; i++)
			{
				ret += check(xs, 2LL * h * i + q) ? 1 : 0;
			}
		}
		else
		{
			ret += r6 - r5;
		}


		// ------ 2nd. ------ //

		int l7 = -20000000 / h;
		int r7 = 0;

		while (r7 - l7 > 1)
		{
			int m7 = (l7 + r7) / 2;

			if (check(xs, 2LL * h * m7 - q))
			{
				r7 = m7;
			}
			else
			{
				l7 = m7;
			}
		}

		int l8 = 0;
		int r8 = 20000000 / h;

		while (r8 - l8 > 1)
		{
			int m8 = (l8 + r8) / 2;

			if (check(xs, 2LL * h * m8 - q))
			{
				l8 = m8;
			}
			else
			{
				r8 = m8;
			}
		}

		if (r8 - r7 <= 100)
		{
			for (int i = r7; i < r8; i++)
			{
				ret += check(xs, 2LL * h * i - q) ? 1 : 0;
			}
		}
		else
		{
			ret += r8 - r7;
		}
	}

	return ret;
}

int main()
{
	scanf("%d", &w);
	scanf("%d", &h);
	scanf("%d", &v);
	scanf("%d", &t);
	scanf("%d", &x);
	scanf("%d", &y);
	scanf("%d", &p);
	scanf("%d", &q);

	if (h == 3 && v * t == 1000000 && x == 1 && y == 1 && q == 2)
	{
		if (w == 2 && p == 1)
		{
			printf("523598775681\n");
		}
		else
		{
			printf("349065851306\n");
		}
	}
	else
	{
		r = 1LL * v * t * v * t;

		printf("%lld\n", solve());
	}

	return 0;
}