Captain Bill the Hummingbird and his crew recieved an interesting challenge offer. Some stranger gave them a map, potion of teleportation and said that only this potion might help them to reach the treasure. 

Bottle with potion has two values x and y written on it. These values define four moves which can be performed using the potion:

  $(a, b) \rightarrow(a + x, b + y)$  $(a, b) \rightarrow(a + x, b - y)$  $(a, b) \rightarrow(a - x, b + y)$  $(a, b) \rightarrow(a - x, b - y)$ 

Map shows that the position of Captain Bill the Hummingbird is (x_1, y_1) and the position of the treasure is (x_2, y_2).

You task is to tell Captain Bill the Hummingbird whether he should accept this challenge or decline. If it is possible for Captain to reach the treasure using the potion then output "YES", otherwise "NO" (without quotes).

The potion can be used infinite amount of times.


-----Input-----

The first line contains four integer numbers x_1, y_1, x_2, y_2 ( - 10^5 ≤ x_1, y_1, x_2, y_2 ≤ 10^5) — positions of Captain Bill the Hummingbird and treasure respectively.

The second line contains two integer numbers x, y (1 ≤ x, y ≤ 10^5) — values on the potion bottle.


-----Output-----

Print "YES" if it is possible for Captain to reach the treasure using the potion, otherwise print "NO" (without quotes).


-----Examples-----
Input
0 0 0 6
2 3

Output
YES

Input
1 1 3 6
1 5

Output
NO



-----Note-----

In the first example there exists such sequence of moves:

  $(0,0) \rightarrow(2,3)$ — the first type of move  $(2,3) \rightarrow(0,6)$ — the third type of move

Difficulty: EASY
Tags: Mathematics

Number theory

Implementation

Starter code:

Solutions:
from __future__ import division, print_function
MOD = 998244353
mod = 10 ** 9 + 7

def prepare_factorial():
	fact = [1]
	for i in range(1, 100005):
		fact.append(fact[-1] * i % mod)
	ifact = [0] * 100005
	ifact[100004] = pow(fact[100004], mod - 2, mod)
	for i in range(100004, 0, -1):
		ifact[i - 1] = i * ifact[i] % mod
	return (fact, ifact)
import sys
from bisect import bisect_left, bisect_right, insort
from math import floor, ceil, sqrt, degrees, atan, pi, log, sin, radians
from heapq import heappop, heapify, heappush
from collections import Counter, defaultdict, deque

def modinv(n, p):
	return pow(n, p - 2, p)

def ncr(n, r, fact, ifact):
	t = fact[n] * (ifact[r] * ifact[n - r]) % mod % mod
	return t

def intarray():
	return map(int, sys.stdin.readline().strip().split())

def array():
	return list(map(int, sys.stdin.readline().strip().split()))

def input():
	return sys.stdin.readline().strip()

def GCD(x, y):
	while y:
		(x, y) = (y, x % y)
	return x

def lcm(x, y):
	return x * y // GCD(x, y)

def get_xor(n):
	return [n, 1, n + 1, 0][n % 4]

def fast_expo(a, b):
	res = 1
	while b:
		if b & 1:
			res = res * a
			res %= MOD
			b -= 1
		else:
			a = a * a
			a %= MOD
			b >>= 1
	res %= MOD
	return res

def get_n(P):
	ans = (-1 + sqrt(1 + 8 * P)) // 2
	return ans

def solve():
	(x1, y1, x2, y2) = array()
	(x, y) = array()
	if abs(x2 - x1) % x == 0 and abs(y2 - y1) % y == 0 and (abs((x2 - x1) // x) % 2 == abs((y2 - y1) // y) % 2):
		print('YES')
	else:
		print('NO')
	return

def main():
	T = 1
	while T:
		solve()
		T -= 1
py2 = round(0.5)
if py2:
	from future_builtins import ascii, filter, hex, map, oct, zip
	range = xrange
import os, sys
from io import IOBase, BytesIO
BUFSIZE = 8192

class FastIO(BytesIO):
	newlines = 0

	def __init__(self, file):
		self._file = file
		self._fd = file.fileno()
		self.writable = 'x' in file.mode or 'w' in file.mode
		self.write = super(FastIO, self).write if self.writable else None

	def _fill(self):
		s = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
		self.seek((self.tell(), self.seek(0, 2), super(FastIO, self).write(s))[0])
		return s

	def read(self):
		while self._fill():
			pass
		return super(FastIO, self).read()

	def readline(self):
		while self.newlines == 0:
			s = self._fill()
			self.newlines = s.count(b'\n') + (not s)
		self.newlines -= 1
		return super(FastIO, self).readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.getvalue())
			(self.truncate(0), self.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		if py2:
			self.write = self.buffer.write
			self.read = self.buffer.read
			self.readline = self.buffer.readline
		else:
			self.write = lambda s: self.buffer.write(s.encode('ascii'))
			self.read = lambda : self.buffer.read().decode('ascii')
			self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')
main()


(x1, y1, x2, y2) = map(int, input().split())
(x, y) = map(int, input().split())
(x, y) = (abs(x), abs(y))
x_ = abs(x2 - x1)
y_ = abs(y2 - y1)
if (x == 0 or x_ % x == 0) and (y == 0 or y_ % y == 0):
	if x == 0 or y == 0:
		print('YES')
	if (x_ // x + y_ // y) % 2 == 0:
		print('YES')
	else:
		print('NO')
else:
	print('NO')


import sys
(x1, y1, x2, y2) = map(int, input().split())
(a, b) = map(int, input().split())
(x, y) = (abs(x2 - x1) / a, abs(y2 - y1) / b)
(c, d) = (abs(x2 - x1) % a, abs(y2 - y1) % b)
if c or d:
	print('NO')
	sys.exit()
elif (x - y) % 2 == 0:
	print('YES')
else:
	print('NO')


(x1, y1, x2, y2) = map(int, input().split())
(x, y) = map(int, input().split())
(x0, y0) = (x2 - x1, y2 - y1)
(x0, y0) = (abs(x0), abs(y0))
for a in range(-2 * 10 ** 5, 2 * 10 ** 5 + 1):
	if x0 % x == 0:
		b = x0 // x - a
		if a * y - b * y == y0:
			print('YES')
			exit(0)
print('NO')


(x1, y1, x2, y2) = map(int, input().split())
(a, b) = map(int, input().split())
if not abs(x1 - x2) % a and (not abs(y1 - y2) % b) and (abs(x1 - x2) // a % 2 == abs(y1 - y2) // b % 2):
	print('YES')
else:
	print('NO')


(x1, y1, x2, y2) = map(int, input().split())
(x, y) = map(int, input().split())
if (x2 - x1) % x != 0 or (y2 - y1) % y != 0:
	print('NO')
else:
	(dx, dy) = (abs(x2 - x1), abs(y2 - y1))
	(kx, ky) = (dx // x, dy // y)
	if (ky - kx) % 2 == 0:
		print('YES')
	else:
		print('NO')


def main():
	import sys
	data = [line.rstrip().split() for line in sys.stdin.readlines()]
	positions = [int(x) for x in data[0]]
	moves = [int(x) for x in data[1]]
	(x1, y1) = (positions[0], positions[1])
	(x2, y2) = (positions[2], positions[3])
	(x, y) = (moves[0], moves[1])
	m = (x2 - x1) / x
	n = (y2 - y1) / y
	if m.is_integer() and n.is_integer() and ((int(m) - int(n)) % 2 == 0):
		print('YES')
	else:
		print('NO')
main()


(x1, y1, x2, y2) = map(int, input().split())
(a, b) = map(int, input().split())
p = abs(x1 - x2) % a
q = abs(y1 - y2) % b
if p != 0 or q != 0:
	print('NO')
else:
	p = abs(x1 - x2) // a
	q = abs(y1 - y2) // b
	if (p + q) % 2 == 0:
		print('YES')
	else:
		print('NO')


import sys
coordinates = sys.stdin.readline()
changeInXY = sys.stdin.readline()
coordinatesSplit = coordinates.split()
changeInXYSplit = changeInXY.split()
coordinatesSplit[0] = int(coordinatesSplit[0])
coordinatesSplit[1] = int(coordinatesSplit[1])
coordinatesSplit[2] = int(coordinatesSplit[2])
coordinatesSplit[3] = int(coordinatesSplit[3])
changeInXYSplit[0] = int(changeInXYSplit[0])
changeInXYSplit[1] = int(changeInXYSplit[1])
xQuotient = (coordinatesSplit[2] - coordinatesSplit[0]) // changeInXYSplit[0]
yQuotient = (coordinatesSplit[3] - coordinatesSplit[1]) // changeInXYSplit[1]
if (coordinatesSplit[2] - coordinatesSplit[0]) % changeInXYSplit[0] != 0:
	print('NO')
elif (coordinatesSplit[3] - coordinatesSplit[1]) % changeInXYSplit[1] != 0:
	print('NO')
elif abs(xQuotient - yQuotient) % 2 == 0:
	print('YES')
else:
	print('NO')


(x1, y1, x2, y2) = (int(x) for x in input().split(' '))
(x, y) = (int(x) for x in input().split(' '))

def abs(a):
	if a < 0:
		return -a
	return a
if (x1 - x2) % x != 0 or (y1 - y2) % y != 0:
	print('NO')
else:
	a = abs(x1 - x2) // x
	b = abs(y1 - y2) // y
	if a & 1 == b & 1:
		print('YES')
	else:
		print('NO')


(x1, y1, x2, y2) = map(int, input().split())
(x, y) = map(int, input().split())
if (x2 - x1) % x == 0 and (y2 - y1) % y == 0:
	if ((x2 - x1) // x - (y2 - y1) // y) % 2 == 0:
		print('YES')
	else:
		print('NO')
else:
	print('NO')


(x1, y1, x2, y2) = (int(x) for x in input().split(' '))
(x, y) = (int(x) for x in input().split(' '))
x3 = abs(x2 - x1)
y3 = abs(y2 - y1)
if x3 % x == 0 and y3 % y == 0 and (x3 / x % 2 == y3 / y % 2):
	print('Yes')
else:
	print('No')


li = list(map(int, input().split(' ')))
li1 = list(map(int, input().split(' ')))
ans = [(li[3] - li[1]) / li1[1], (li[2] - li[0]) / li1[0]]
check = True
for i in range(len(ans)):
	if ans[i] < 0:
		ans[i] *= -1
	if ans[i] != int(ans[i]):
		check = False
if check and (ans[0] % 2 == 0 and ans[1] % 2 == 0 or (ans[1] % 2 != 0 and ans[0] % 2 != 0)):
	print('Yes')
else:
	print('No')


(x1, y1, x2, y2) = map(int, input().split())
a = abs(x1 - x2)
b = abs(y1 - y2)
(x, y) = map(int, input().split())
if a % x != 0 or b % y != 0:
	print('NO')
else:
	par1 = a / x
	par2 = b / y
	par1 = par1 % 2
	par2 = par2 % 2
	if par1 != par2:
		print('NO')
	else:
		print('YES')


(x, y, x2, y2) = map(int, input().split())
(a, b) = map(int, input().split())
flag = 1
if (x2 - x) % a != 0 or (y2 - y) % b != 0:
	flag = 0
else:
	t = (x2 - x) // a
	t2 = (y2 - y) // b
	if t % 2 == t2 % 2:
		print('YES')
	else:
		flag = 0
if flag == 0:
	print('NO')


inp = list(map(int, input().split()))
x1 = inp[0]
y1 = inp[1]
x2 = inp[2]
y2 = inp[3]
inp = list(map(int, input().split()))
a = inp[0]
b = inp[1]
if (x1 - x2) % a == 0 and (y1 - y2) % b == 0:
	k1 = (x1 - x2) // a
	k2 = (y1 - y2) // b
	if (k1 - k2) % 2 == 0:
		print('YES')
	else:
		print('NO')
else:
	print('NO')


(x1, y1, x2, y2) = (int(i) for i in input().split())
(xx, yy) = (abs(int(i)) for i in input().split())
dx = abs(x2 - x1)
dy = abs(y2 - y1)
if dx % xx != 0 or dy % yy != 0:
	print('NO')
else:
	xs = dx // xx
	ys = dy // yy
	if abs(xs - ys) % 2 == 0:
		print('YES')
	else:
		print('NO')


(x1, y1, x2, y2) = map(int, input().split())
(x, y) = map(int, input().split())
if (x2 - x1) % x != 0 or (y2 - y1) % y != 0:
	print('NO')
else:
	fx = (x2 - x1) // x
	fy = (y2 - y1) // y
	if (fx + fy) % 2 == 0:
		print('YES')
	else:
		print('NO')


(a, b, c, d) = map(int, input().split())
(e, f) = map(int, input().split())
if (c - a) % e or (d - b) % f or (c - a) // e & 1 != (d - b) // f & 1:
	print('NO')
else:
	print('YES')


(a, b, c, d) = map(int, input().split())
(x, y) = map(int, input().split())
m = abs(c - a)
n = abs(d - b)
if m % x != 0 or n % y != 0:
	print('NO')
elif m // x % 2 != n // y % 2:
	print('NO')
else:
	print('YES')


(x_1, y_1, x_2, y_2) = map(int, input().split())
(a, b) = map(int, input().split())
if (x_1 - x_2) % a == 0 and (y_1 - y_2) % b == 0:
	n = (x_1 - x_2) // a
	m = (y_1 - y_2) // b
	if abs(n) % 2 == abs(m) % 2:
		print('YES')
	else:
		print('NO')
else:
	print('NO')


a = input().split(' ')
b = input().split(' ')
if (int(a[2]) - int(a[0])) % int(b[0]) != 0 or (int(a[3]) - int(a[1])) % int(b[1]) != 0:
	print('NO')
elif (int(a[2]) - int(a[0])) // int(b[0]) % 2 == (int(a[3]) - int(a[1])) // int(b[1]) % 2:
	print('YES')
else:
	print('NO')


(x0, y0, x1, y1) = list(map(int, input().split()))
(x, y) = list(map(int, input().split()))
if (y1 - y0) % y != 0 or (x1 - x0) % x != 0:
	print('NO')
elif (y1 - y0) // y % 2 == (x1 - x0) // x % 2:
	print('YES')
else:
	print('NO')


def main():
	(sa, sb, ma, mb) = map(int, input().split())
	(x, y) = map(int, input().split())
	ma -= sa
	mb -= sb
	if ma % x != 0:
		return 'NO'
	if mb % y != 0:
		return 'NO'
	ma /= x
	mb /= y
	if ma == mb:
		return 'YES'
	if (ma - mb) % 2 == 0:
		return 'YES'
	return 'NO'
print(main())


(a, b, c, d) = map(int, input().split())
(x, y) = map(int, input().split())
a = abs(a - c)
b = abs(b - d)
if a % x == 0 and b % y == 0 and (a // x % 2 == b // y % 2):
	print('YES')
else:
	print('NO')


ch1 = input()
l1 = ch1.split(' ')
x1 = int(l1[0])
y1 = int(l1[1])
x2 = int(l1[2])
y2 = int(l1[3])
ch2 = input()
l2 = ch2.split(' ')
a = int(l2[0])
b = int(l2[1])

def test(u, v, w):
	if abs(u - v) % w == 0:
		return (True, abs(u - v) // w)
	else:
		return (False, -1)
(t1, n1) = test(x1, x2, a)
(t2, n2) = test(y1, y2, b)
if t1 and t2 and (abs(n1 - n2) % 2 == 0):
	print('YES')
else:
	print('NO')


import sys
(x1, y1, x2, y2) = map(int, input().split())
(x, y) = map(int, input().split())
(dx, dy) = (abs(x1 - x2), abs(y1 - y2))
if dx % x == 0 and dy % y == 0 and (dx // x & 1 == dy // y & 1):
	print('YES')
else:
	print('NO')


import sys
import math
import itertools
import collections

def sieve(n):
	if n < 2:
		return list()
	prime = [True for _ in range(n + 1)]
	p = 3
	while p * p <= n:
		if prime[p]:
			for i in range(p * 2, n + 1, p):
				prime[i] = False
		p += 2
	r = [2]
	for p in range(3, n + 1, 2):
		if prime[p]:
			r.append(p)
	return r

def divs(n, start=1):
	r = []
	for i in range(start, int(math.sqrt(n) + 1)):
		if n % i == 0:
			if n / i == i:
				r.append(i)
			else:
				r.extend([i, n // i])
	return r

def divn(n, primes):
	divs_number = 1
	for i in primes:
		if n == 1:
			return divs_number
		t = 1
		while n % i == 0:
			t += 1
			n //= i
		divs_number *= t

def prime(n):
	if n == 2:
		return True
	if n % 2 == 0 or n <= 1:
		return False
	sqr = int(math.sqrt(n)) + 1
	for d in range(3, sqr, 2):
		if n % d == 0:
			return False
	return True

def convn(number, base):
	newnumber = 0
	while number > 0:
		newnumber += number % base
		number //= base
	return newnumber

def cdiv(n, k):
	return n // k + (n % k != 0)

def ii():
	return int(input())

def mi():
	return map(int, input().split())

def li():
	return list(map(int, input().split()))

def lcm(a, b):
	return abs(a * b) // math.gcd(a, b)

def wr(arr):
	return ' '.join(map(str, arr))

def revn(n):
	return str(n)[::-1]

def dd():
	return collections.defaultdict(int)

def ddl():
	return collections.defaultdict(list)
(x1, y1, x2, y2) = mi()
(x, y) = mi()
print('YES') if abs(x1 - x2) // x % 2 == abs(y1 - y2) // y % 2 and abs(x1 - x2) % x == 0 and (abs(y1 - y2) % y == 0) else print('NO')


arr = [int(x) for x in input().split()]
another = [int(x) for x in input().split()]
x1 = arr[0]
y1 = arr[1]
x2 = arr[2]
y2 = arr[3]
x = another[0]
y = another[1]
dict = {}
check = True
while (x1, y1) not in dict:
	dict[x1, y1] = 1
	if x1 == x2 and y1 == y2:
		check = False
		print('YES')
	if x1 <= x2:
		x1 += x
	else:
		x1 -= x
	if y1 <= y2:
		y1 += y
	else:
		y1 -= y
if check:
	print('NO')


line1 = input()
line2 = input()
coords = list(map(int, line1.split()))
(v1, v2) = list(map(int, line2.split()))
dx = coords[2] - coords[0]
dy = coords[3] - coords[1]
if dx % v1 == 0 and dy % v2 == 0 and ((dx // v1 - dy // v2) % 2 == 0):
	print('YES')
else:
	print('NO')


def list_input():
	return list(map(int, input().split()))
[x1, y1, x2, y2] = list_input()
[x, y] = list_input()
dx = abs(x1 - x2)
dy = abs(y1 - y2)
if dx % x == 0 and dy % y == 0 and (abs(dx // x - dy // y) % 2 == 0):
	print('YES')
else:
	print('NO')


import sys, math, io, os, time, itertools, collections
mod = 10 ** 9 + 7
sys.setrecursionlimit(10000)
i = sys.stdin.readline
p = sys.stdout.write
global start, end

def isin(l, x):
	left = 0
	right = len(l) - 1
	if x < l[0]:
		return -1
	while left <= right:
		mid = left + (right - left) // 2
		if l[mid] == x:
			return mid
		elif l[mid] < x:
			ans = mid
			left = mid + 1
		else:
			right = mid - 1
	return ans

def ispal(l):
	n = len(l)
	for i in range(n // 2 + 1):
		if l[i] != l[n - i - 1]:
			return False
	return True

def ccarray(l):
	d = {l[k]: k for k in range(len(l))}
	m = sorted(d)
	return [d[m[k]] for k in range(len(l))]

def is_prime(n):
	if n <= 3:
		return n > 1
	if n % 2 == 0 or n % 3 == 0:
		return False
	k = 5
	while k ** 2 <= n:
		if n % k == 0 or n % (k + 2) == 0:
			return False
		k += 6
	return True

def sieve(n):
	prime = [True for k in range(n + 1)]
	p = 2
	while p * p <= n:
		if prime[p] == True:
			for k in range(p * p, n + 1, p):
				prime[k] = False
		p += 1

def main():
	(x1, y1, x2, y2) = [int(k) for k in i().split()]
	(x, y) = [int(k) for k in i().split()]
	if abs(x1 - x2) % x == 0 and abs(y1 - y2) % y == 0:
		if abs((x1 - x2) // x) % 2 == abs((y1 - y2) // y) % 2:
			p('YES\n')
		else:
			p('NO\n')
	else:
		p('NO\n')
t = 1
start = time.perf_counter()
for _ in range(t):
	main()
end = time.perf_counter()


from math import *
(x1, y1, x2, y2) = map(int, input().split())
(x, y) = map(int, input().split())
dist_x = abs(x2 - x1)
dist_y = abs(y2 - y1)
if dist_x % x == 0 and dist_y % y == 0 and (dist_x // x % 2 == dist_y // y % 2):
	print('YES')
else:
	print('NO')


(a, b, c, d) = (int(x) for x in input().split())
(x, y) = (int(k) for k in input().split())
A = abs(a - c)
B = abs(b - d)
if A % x == 0 and B % y == 0 and (A // x % 2 == B // y % 2):
	print('Yes')
else:
	print('No')


(x1, y1, x2, y2) = map(int, input().split())
(a, b) = map(int, input().split())
x = abs(x1 - x2)
y = abs(y1 - y2)
if x % a or y % b:
	print('NO')
else:
	u = x // a
	v = y // b
	if u % 2 == v % 2:
		print('YES')
	else:
		print('NO')


(x1, y1, x2, y2) = map(int, input().split())
(x, y) = map(int, input().split())
ans = True
if (x2 - x1) % x == 0 and (y2 - y1) % y == 0:
	l1 = abs(x2 - x1) // x % 2 == 0
	l2 = abs(y2 - y1) // y % 2 == 0
	if l1 ^ l2:
		print('NO')
	else:
		print('YES')
else:
	print('NO')


(a, b, c, d) = input().strip().split(' ')
(x1, y1, x2, y2) = (int(a), int(b), int(c), int(d))
(x, y) = input().strip().split(' ')
(x, y) = (int(x), int(y))
if (x2 - x1) % x == 0 and (y2 - y1) % y == 0:
	a1 = (x2 - x1) // x
	a2 = (y2 - y1) // y
	if a1 % 2 == 0 and a2 % 2 == 0 or (a1 % 2 == 1 and a2 % 2 == 1):
		print('YES')
		exit()
print('NO')


def main():
	(x1, y1, x2, y2) = map(int, input().split())
	(x, y) = map(int, input().split())
	if (x2 - x1) % x != 0 or (y2 - y1) % y != 0:
		print('NO')
		return
	a = abs((x2 - x1) // x)
	b = abs((y2 - y1) // y)
	if a % 2 == b % 2:
		print('YES')
		return
	else:
		print('NO')
		return
main()


import sys
input = sys.stdin.readline
from collections import defaultdict as dc
from collections import Counter
from bisect import bisect_right, bisect_left, bisect
import math
from operator import itemgetter
from heapq import heapify, heappop, heappush
(x1, y1, x2, y2) = map(int, input().split())
(x, y) = map(int, input().split())
if abs(x2 - x1) % x == 0 and abs(y2 - y1) % y == 0 and (abs(x2 - x1) // x % 2 == abs(y2 - y1) // y % 2):
	print('YES')
else:
	print('NO')


(x1, y1, x2, y2) = map(int, input().split())
(x, y) = map(int, input().split())
val_1 = abs(x1 - x2) // x
val_2 = abs(y1 - y2) // y
if abs(x1 - x2) % x != 0 or abs(y1 - y2) % y != 0:
	print('NO')
elif val_1 % 2 == 0 and val_2 % 2 == 0 or (val_1 % 2 == 1 and val_2 % 2 == 1):
	print('YES')
else:
	print('NO')


import sys
import math
input = sys.stdin.readline

def inp():
	return int(input())

def inlt():
	return list(map(int, input().split()))

def insr():
	s = input()
	return list(s[:len(s) - 1])

def invr():
	return map(int, input().split())

def isPrime(n):
	if n < 2:
		return False
	for x in range(2, int(n ** 0.5) + 1):
		if n % x == 0:
			return False
	return True

def countDivisors(n):
	cnt = 0
	for i in range(1, int(math.sqrt(n)) + 1):
		if n % i == 0:
			if n / i == i:
				cnt = cnt + 1
			else:
				cnt = cnt + 2
	return cnt
(x1, y1, x2, y2) = invr()
(x, y) = invr()
xdiff = abs(x1 - x2)
ydiff = abs(y1 - y2)
if xdiff % x != 0 or ydiff % y != 0:
	print('NO')
elif abs(xdiff // x - ydiff // y) % 2 == 0:
	print('YES')
else:
	print('NO')


(x1, y1, x2, y2) = map(int, input().split())
(x, y) = map(int, input().split())
xr = abs(x1 - x2)
yr = abs(y1 - y2)
if xr % x == 0 and yr % y == 0:
	if xr // x % 2 == yr // y % 2:
		print('YES')
		exit()
print('NO')


(x1, y1, x2, y2) = [int(e) for e in input().split(' ')]
(px, py) = [int(e) for e in input().split(' ')]
dx = abs(x1 - x2)
dy = abs(y1 - y2)
if dx % px == 0 and dy % py == 0:
	qtd_x = abs(dx / px)
	restante = abs(dy - abs(qtd_x * py))
	if restante / py % 2 == 0:
		print('YES')
	else:
		print('NO')
else:
	print('NO')


(x1, y1, x2, y2) = map(int, input().split(' '))
(x, y) = map(int, input().split(' '))
if abs(x1 - x2) % x == 0 and abs(y1 - y2) % y == 0 and (abs((x1 - x2) / x) % 2 == abs((y1 - y2) / y) % 2):
	print('Yes')
else:
	print('No')


R = lambda : list(map(int, input().split()))
(a, b, c, d) = R()
(e, f) = R()
print('Yes' if abs(a - c) % e == 0 and abs(b - d) % f == 0 and (abs(a - c) / e % 2 == abs(b - d) / f % 2) else 'No')


(x1, y1, x2, y2) = input().strip().split(' ')
(x1, y1, x2, y2) = (int(x1), int(y1), int(x2), int(y2))
(x, y) = input().strip().split(' ')
(x, y) = (int(x), int(y))
if (x2 - x1) % x == 0 and (y2 - y1) % y == 0:
	a1 = (x2 - x1) // x
	a2 = (y2 - y1) // y
	if a1 % 2 == 0 and a2 % 2 == 0 or (a1 % 2 == 1 and a2 % 2 == 1):
		print('YES')
		exit()
print('NO')


def main():
	(x1, y1, x2, y2) = list(map(int, input().split()))
	(a, b) = list(map(int, input().split()))
	xd = x2 - x1
	yd = y2 - y1
	if xd % a != 0 or yd % b != 0:
		print('NO')
		return
	xd /= a
	yd /= b
	print('YES' if xd % 2 == yd % 2 else 'NO')
main()


(x1, y1, x2, y2) = map(int, input().split())
(x, y) = map(int, input().split())
(dx, dy) = (abs(x2 - x1), abs(y2 - y1))
print(('NO', 'YES')[dx % x == 0 and dy % y == 0 and (dx // x % 2 == dy // y % 2)])


(x1, y1, x2, y2) = [int(i) for i in input().split()]
(x, y) = [int(i) for i in input().split()]
if (x2 - x1) % x == 0 and (y2 - y1) % y == 0 and (abs(x2 - x1) / x % 2 == abs(y2 - y1) / y % 2):
	print('YES')
else:
	print('NO')


def solve(x1, y1, x2, y2, x, y):
	if abs(x2 - x1) % x != 0 or abs(y2 - y1) % y != 0:
		return 'NO'
	p = abs(x2 - x1) // x
	q = abs(y2 - y1) // y
	if p & 1 != q & 1:
		return 'NO'
	return 'YES'

def main():
	(x1, y1, x2, y2) = map(int, input().split(' '))
	(x, y) = map(int, input().split())
	print(solve(x1, y1, x2, y2, x, y))
main()


(x1, y1, x2, y2) = map(int, input().strip().split(' '))
(x, y) = map(int, input().strip().split(' '))
if abs(y2 - y1) % y != 0:
	print('NO')
elif abs(x2 - x1) % x != 0:
	print('NO')
else:
	t1 = abs(x1 - x2) // x
	t2 = abs(y1 - y2) // y
	if abs(t1 - t2) % 2 == 0:
		print('YES')
	else:
		print('NO')


(x1, y1, x2, y2) = map(int, input().split())
(x, y) = map(int, input().split())
k = abs(x1 - x2) / x
l = abs(y1 - y2) / y
if int(k) != k or int(l) != l:
	print('NO')
elif int(k) % 2 == int(l) % 2:
	print('YES')
else:
	print('NO')


(x1, y1, x2, y2) = map(int, input().split())
(a, b) = map(int, input().split())
print('NO YES'.split()[((x2 - x1) // a - (y2 - y1) // b) % 2 == 0 and (x2 - x1) % a == 0 and ((y2 - y1) % b == 0)])


n = [int(i) for i in input().split()]
x = [int(i) for i in input().split()]
z1 = abs(n[2] - n[0]) // x[0]
z2 = abs(n[3] - n[1]) // x[1]
if abs(z2 - z1) % 2 == 0 and abs(n[2] - n[0]) % x[0] == 0 and (abs(n[3] - n[1]) % x[1] == 0):
	print('YES')
else:
	print('NO')


from collections import deque as de
import math
from collections import Counter as cnt
from functools import reduce
from typing import MutableMapping
from itertools import groupby as gb

def factors(n):
	return set(reduce(list.__add__, ([i, n // i] for i in range(1, int(n ** 0.5) + 1) if n % i == 0)))

class My_stack:

	def __init__(self):
		self.data = []

	def my_push(self, x):
		return self.data.append(x)

	def my_pop(self):
		return self.data.pop()

	def my_peak(self):
		return self.data[-1]

	def my_contains(self, x):
		return self.data.count(x)

	def my_show_all(self):
		return self.data

	def isEmpty(self):
		return len(self.data) == 0
arrStack = My_stack()

def decimalToBinary(n):
	return bin(n).replace('0b', '')

def isPrime(n):
	if n <= 1:
		return False
	if n <= 3:
		return True
	if n % 2 == 0 or n % 3 == 0:
		return False
	i = 5
	while i * i <= n:
		if n % i == 0 or n % (i + 2) == 0:
			return False
		i = i + 6
	return True

def get_prime_factors(number):
	prime_factors = []
	while number % 2 == 0:
		prime_factors.append(2)
		number = number / 2
	for i in range(3, int(math.sqrt(number)) + 1, 2):
		while number % i == 0:
			prime_factors.append(int(i))
			number = number / i
	if number > 2:
		prime_factors.append(int(number))
	return prime_factors

def get_frequency(list):
	dic = {}
	for ele in list:
		if ele in dic:
			dic[ele] += 1
		else:
			dic[ele] = 1
	return dic

def Log2(x):
	return math.log10(x) / math.log10(2)

def isPowerOfTwo(n):
	return math.ceil(Log2(n)) == math.floor(Log2(n))
(x1, y1, x2, y2) = map(int, input().split())
(x, y) = map(int, input().split())
if x1 == x2 and y1 == y2:
	print('YES')
elif abs(x1 - x2) % x == 0 and abs(y1 - y2) % y == 0:
	if abs(abs(x1 - x2) // x - abs(y1 - y2) // y) % 2 == 0:
		print('YES')
	else:
		print('NO')
else:
	print('NO')


import sys
(x1, y1, x2, y2) = map(int, sys.stdin.readline().strip().split())
(x, y) = map(int, sys.stdin.readline().strip().split())
if abs(x1 - x2) % x != 0 or abs(y1 - y2) % y != 0:
	print('NO')
else:
	a = abs(x1 - x2) / x
	b = abs(y1 - y2) / y
	if a % 2 == b % 2:
		print('YES')
	else:
		print('NO')


(a, b, c, d) = tuple(map(int, input().split()))
(x, y) = tuple(map(int, input().split()))
print(['NO', 'YES'][a % x == c % x and b % y == d % y and ((c - a) // x % 2 == (d - b) // y % 2)])


(x1, y1, x2, y2) = map(int, input().split())
(x, y) = map(int, input().split())
if x1 == x2 and y1 == y2:
	print('YES')
	exit()
if abs(x1 - x2) % x == 0 and abs(y1 - y2) % y == 0 and (abs(y1 - y2) // y == abs(x1 - x2) // x or (abs(x1 - x2) // x % 2 == 0 and abs(y1 - y2) // y % 2 == 0) or (abs(x1 - x2) // x % 2 == 1 and abs(y1 - y2) // y % 2 == 1)):
	print('YES')
else:
	print('NO')


(x1, y1, x2, y2) = map(int, input().split())
(x, y) = map(int, input().split())
if x1 == x2 and y1 == y2:
	print('YES')
elif x2 == x1 and abs(y2 - y1) % y == 0:
	move_y = abs(y2 - y1) // y
	if move_y % 2 == 0:
		print('YES')
	else:
		print('NO')
elif y2 == y1 and abs(x2 - x1) % x == 0:
	move_x = abs(x2 - x1) // x
	if move_x % 2 == 0:
		print('YES')
	else:
		print('NO')
elif abs(x2 - x1) % x == 0 and abs(y2 - y1) % y == 0:
	move_x = abs(x2 - x1) // x
	move_y = abs(y2 - y1) // y
	if abs(move_x - move_y) % 2 == 0:
		print('YES')
	else:
		print('NO')
else:
	print('NO')


points = input()
potion = input()
points = points.split()
x1 = int(points[0])
y1 = int(points[1])
x2 = int(points[2])
y2 = int(points[3])
potion = potion.split()
x = int(potion[0])
y = int(potion[1])
dic = {}
while True:
	if x1 < x2:
		x1 = x1 + x
	else:
		x1 = x1 - x
	if y1 < y2:
		y1 = y1 + y
	else:
		y1 = y1 - y
	key = str(x1) + ',' + str(y1)
	if x1 == x2 and y1 == y2:
		print('YES')
		break
	elif key in dic:
		print('NO')
		break
	dic[key] = 1


(x1, y1, x2, y2) = list(map(int, input().split()))
(x, y) = list(map(int, input().split()))
dx = x1 - x2 if x1 > x2 else x2 - x1
dy = y1 - y2 if y1 > y2 else y2 - y1
if all([2 == 2, dx % x == 0, dy % y == 0, dx // x % 2 == dy // y % 2]):
	print('Yes')
else:
	print('No')


(x1, y1, x2, y2) = map(int, input().split())
(x, y) = map(int, input().split())
diff_y = abs(y1 - y2)
diff_x = abs(x1 - x2)
ans = 'NO'
if diff_y % y == 0 and diff_x % x == 0:
	yy = diff_y // y
	xx = diff_x // x
	if xx == yy:
		ans = 'YES'
	elif xx != yy:
		if diff_y // y % 2 == diff_x // x % 2:
			ans = 'YES'
	else:
		ans = 'NO'
else:
	ans = 'NO'
print(ans)


import sys, math, queue, bisect
MOD = 10 ** 9 + 7
sys.setrecursionlimit(1000000)
(x1, y1, x2, y2) = map(int, input().split())
(x, y) = map(int, input().split())
if (x2 - x1) % x == 0 and (y2 - y1) % y == 0:
	d1 = (x2 - x1) // x
	d2 = (y2 - y1) // y
	if (d1 - d2) % 2 == 0:
		print('YES')
	else:
		print('NO')
else:
	print('NO')


raw_loc = input().split()
x = int(raw_loc[0]) - int(raw_loc[2])
y = int(raw_loc[1]) - int(raw_loc[3])
raw_moves = input().split()
a = int(raw_moves[0])
b = int(raw_moves[1])
if x % a == 0 and y % b == 0:
	if (x / a + y / b) % 2 == 0:
		print('YES')
	else:
		print('NO')
else:
	print('NO')


(x1, y1, x2, y2) = [int(i) for i in input().split()]
(x, y) = [int(i) for i in input().split()]
v = x2 - x1
f = y2 - y1
if v % x != 0 or f % y != 0:
	print('NO')
elif (v // x - f // y) % 2 == 0:
	print('YES')
else:
	print('NO')


(xp, yp, xt, yt) = map(int, input().split())
(mx, my) = map(int, input().split())
dx = abs(xt - xp)
dy = abs(yp - yt)
if not dx % mx and (not dy % my):
	x = dx / mx
	y = dy / my
	if x % 2 == y % 2:
		print('YES')
	else:
		print('NO')
else:
	print('NO')


a = [int(s) for s in input().split()]
x = [int(s) for s in input().split()]
if (a[2] - a[0]) % x[0] == 0 and (a[3] - a[1]) % x[1] == 0 and ((a[2] - a[0] == 0 or a[3] - a[1] == 0) and abs(abs((a[2] - a[0]) // x[0] - abs((a[3] - a[1]) // x[1])) % 2 == 0)):
	print('Yes')
elif (a[2] - a[0]) % x[0] == 0 and (a[3] - a[1]) % x[1] == 0 and ((a[2] - a[0]) // x[0] == (a[3] - a[1]) // x[1]):
	print('Yes')
elif (a[2] - a[0]) % x[0] == 0 and (a[3] - a[1]) % x[1] == 0 and abs(abs((a[2] - a[0]) // x[0] - abs((a[3] - a[1]) // x[1])) % 2 == 0):
	print('Yes')
else:
	print('No')


def main():

	def find(x1, y1, x2, y2, x, y):
		c = x2 - x1
		d = y2 - y1
		if c % x != 0 or d % y != 0:
			return 0
		else:
			p = c // x
			q = d // y
			if (p - q) % 2 == 0:
				return 1
			else:
				return 0
	(x1, y1, x2, y2) = list(map(int, input().strip().split(' ')))
	(x, y) = list(map(int, input().strip().split(' ')))
	if find(x1, y1, x2, y2, x, y) == 1:
		print('YES')
	else:
		print('NO')
main()


import os, sys
from io import BytesIO, IOBase
from types import GeneratorType
from bisect import *
from collections import defaultdict, deque, Counter
import math, string
from heapq import *
from operator import add
from itertools import accumulate
BUFSIZE = 8192
sys.setrecursionlimit(10 ** 5)

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		import os
		self.os = os
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = self.os.read(self._fd, max(self.os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = self.os.read(self._fd, max(self.os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			self.os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')
inf = float('inf')
en = lambda x: list(enumerate(x))
ceil_ = lambda a, b: (a + b - 1) // b
ii = lambda : int(input())
r = lambda : map(int, input().split())
rr = lambda : list(r())
(a, b, c, d) = r()
(x, y) = r()
a = abs(a - c)
b = abs(b - d)
if a % x or b % y:
	print('NO')
	exit()
a = a // x
b = b // y
if not a and (not b):
	print('YES')
	exit()
print('YES' if a % 2 == b % 2 else 'NO')


(x1, y1, x2, y2) = map(int, input().split())
(x, y) = map(int, input().split())
deltaX = abs(x2 - x1)
deltaY = abs(y2 - y1)
if (y2 - y1) % (2 * y) == 0 and (x2 - x1) % (2 * x) == 0:
	print('YES')
elif (x2 - x - x1) % (2 * x) == 0 and (y2 - y - y1) % (2 * y) == 0:
	print('YES')
else:
	print('NO')


(x1, y1, x2, y2) = map(int, input().split())
(a, b) = map(int, input().split())
(x3, y3) = (x2 - x1, y2 - y1)
if x3 % a == 0 and y3 % b == 0 and ((abs(x3 // a) - abs(y3 // b)) % 2 == 0):
	print('YES')
else:
	print('NO')


(x1, y1, x2, y2) = map(int, input().split())
(a, b) = map(int, input().split())
(q, w) = (abs(x1 - x2), abs(y1 - y2))
if q % a == 0 and w % b == 0:
	if q // a % 2 == w // b % 2:
		exit(print('YES'))
print('NO')


(x1, y1, x2, y2) = map(int, input().split())
(a, b) = map(int, input().split())
x = (x1 - x2) / a
y = (y1 - y2) / b
if x == int(x) and y == int(y) and (int(x) & 1 == int(y) & 1):
	print('YES')
else:
	print('NO')


(x, y, x1, y1) = map(int, input().split())
(a, b) = map(int, input().split())

def possible():
	diff_x = abs(x - x1)
	diff_y = abs(y - y1)
	if diff_x % a != 0 or diff_y % b != 0:
		return False
	if (diff_x / a + diff_y / b) % 2 == 0:
		return True
	return False
if possible():
	print('YES')
else:
	print('NO')


import os
import sys, math
from io import BytesIO, IOBase

def main():
	t = 1
	for case in range(t):
		(x1, y1, x2, y2) = list(map(int, input().split()))
		(x, y) = list(map(int, input().split()))
		diffx = abs(x1 - x2)
		diffy = abs(y1 - y2)
		if diffx % x == 0 and diffy % y == 0 and (abs(diffx // x - diffy // y) % 2 == 0):
			print('YES')
		else:
			print('NO')
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')
main()


(x1, y1, x2, y2) = map(int, input().split())
n = list(map(int, input().split()))
k = abs(x2 - x1)
l = abs(y2 - y1)
if k % n[0] == 0 and l % n[1] == 0:
	if k // n[0] % 2 == 0 and l // n[1] % 2 == 0:
		print('YES')
	elif k // n[0] % 2 == 1 and l // n[1] % 2 == 1:
		print('YES')
	else:
		print('NO')
else:
	print('NO')


from fractions import gcd
(x1, y1, x2, y2) = list(map(int, input().split()))
(x, y) = list(map(int, input().split()))
if x1 > x2:
	(x1, x2) = (x2, x1)
if y1 > y2:
	(y1, y2) = (y2, y1)
if (x2 - x1) % x == 0 and (y2 - y1) % y == 0 and ((x2 - x1) // x % 2 == (y2 - y1) // y % 2):
	print('YES')
else:
	print('NO')


(x1, y1, x2, y2) = map(int, input().split())
(a, b) = map(int, input().split())
if (abs(x1 - x2) // a - abs(y2 - y1) // b) % 2 == 0 and abs(x1 - x2) % a == abs(y2 - y1) % b == 0:
	print('Yes')
else:
	print('No')


(a, b, c, d) = map(int, input().rstrip().split())
(x, y) = map(int, input().rstrip().split())
if (a - c) % x != 0 or (b - d) % y != 0:
	print('NO')
else:
	p = (a - c) // x
	q = (b - d) // y
	r = min(p, q)
	p -= r
	q -= r
	if q % 2 == 0 and p % 2 == 0:
		print('YES')
	else:
		print('NO')


(x1, x2, x3, x4) = map(int, input().split(' '))
(x, y) = map(int, input().split(' '))
coordinates = abs(x2 - x4)
co = abs(x1 - x3)
if coordinates % y == 0 and co % x == 0 and (abs(x1 - x3) // x % 2 == abs(x2 - x4) // y % 2):
	print('YES')
else:
	print('NO')


import sys, os.path
if os.path.exists('input.txt'):
	sys.stdin = open('input.txt', 'r')
	sys.stdout = open('output.txt', 'w')
(a1, b1, a2, b2) = map(int, input().split())
(x, y) = map(int, input().split())
if (max(a1, a2) - min(a1, a2)) % x == 0 and (max(b1, b2) - min(b1, b2)) % y == 0 and (((max(a1, a2) - min(a1, a2)) // x - (max(b1, b2) - min(b1, b2)) // y) % 2 == 0):
	print('YES')
else:
	print('NO')


(x1, x2, x3, x4) = map(int, input().split())
x = x1 - x3
y = x2 - x4
x = abs(x)
y = abs(y)
(a, b) = map(int, input().split())
if x % a + y % b > 0:
	print('NO')
else:
	q = x // a
	w = y // b
	if q % 2 != w % 2:
		print('NO')
	else:
		print('YES')


I = lambda : map(int, input().split())
(x1, y1, x2, y2) = I()
(x, y) = I()
(a, b) = divmod(x1 - x2, x)
(c, d) = divmod(y1 - y2, y)
print('NO' if b or d or (a + c) % 2 else 'YES')


(a, b, c, d) = list(map(int, input().split()))
(e, f) = list(map(int, input().split()))
p = abs(c - a)
q = abs(d - b)
if p % e == 0 and q % f == 0:
	if p // e == q // f:
		print('YES')
	elif abs(p // e - q // f) % 2 == 0:
		print('YES')
	else:
		print('NO')
else:
	print('NO')


(x1, y1) = (0, 0)
(x2, y2) = (0, 0)
(x, y) = (0, 0)

def get_io():
	f_arr = [int(x) for x in input().split()]
	global x1, y1, x2, y2, x, y
	(x1, y1) = (f_arr[0], f_arr[1])
	(x2, y2) = (f_arr[2], f_arr[3])
	s_arr = [int(x) for x in input().split()]
	(x, y) = (s_arr[0], s_arr[1])

def solve_pr():
	if (x2 - x1) % x != 0:
		return False
	if (y2 - y1) % y != 0:
		return False
	m = (x2 - x1) / x
	n = (y2 - y1) / y
	if m % 2 != n % 2:
		return False
	return True
get_io()
if solve_pr():
	print('YES')
else:
	print('NO')


(a, b, c, d) = input().split()
(x, y) = input().split()
a = int(a)
b = int(b)
c = int(c)
d = int(d)
x = int(x)
y = int(y)
p = abs(a - c)
q = abs(b - d)
if (abs(p / x - q / y) % 2 or p % x or q % y) == False:
	print('Yes')
else:
	print('No')


R = lambda : list(map(int, input().split()))
(sx, sy, ex, ey) = R()
(a, b) = R()
dx = abs(sx - ex)
dy = abs(sy - ey)
m = lambda x: x % 2
print('YES' if dx % a == 0 and dy % b == 0 and (m(dx / a) == m(dy / b)) else 'NO')


[x1, y1, x2, y2] = [int(x) for x in input().split()]
[x, y] = [int(x) for x in input().split()]
print(['NO', 'YES'][(x2 - x1) / x % 2 == (y2 - y1) / y % 2 and (x2 - x1) % x == (y2 - y1) % y == 0])


(x1, y1, x2, y2) = map(int, input().split())
(x, y) = map(int, input().split())
a = x2 - x1
b = y2 - y1
c1 = 0
c2 = 0
if a % x == 0 and b % y == 0:
	c1 = a / x
	c2 = b / y
	if c1 % 2 == 0 and c2 % 2 == 0 or (c1 % 2 != 0 and c2 % 2 != 0):
		print('YES')
	else:
		print('NO')
else:
	print('NO')


class CodeforcesTask817ASolution:

	def __init__(self):
		self.result = ''
		self.cords = []
		self.moves = []

	def read_input(self):
		self.cords = [int(x) for x in input().split(' ')]
		self.moves = [int(x) for x in input().split(' ')]

	def process_task(self):
		if abs(self.cords[0] - self.cords[2]) % self.moves[0] == 0 and abs(self.cords[1] - self.cords[3]) % self.moves[1] == 0:
			if abs(self.cords[0] - self.cords[2]) // self.moves[0] % 2 == 0 and abs(self.cords[1] - self.cords[3]) // self.moves[1] % 2 == 0 or (abs(self.cords[0] - self.cords[2]) // self.moves[0] % 2 == 1 and abs(self.cords[1] - self.cords[3]) // self.moves[1] % 2 == 1):
				self.result = 'YES'
			else:
				self.result = 'NO'
		else:
			self.result = 'NO'

	def get_result(self):
		return self.result
Solution = CodeforcesTask817ASolution()
Solution.read_input()
Solution.process_task()
print(Solution.get_result())


(x1, y1, x2, y2) = map(int, input().split())
(x, y) = map(int, input().split())
del_a = abs(x1 - x2)
del_b = abs(y1 - y2)
if x == 0:
	print('YES' if del_b % y == 0 else 'NO')
	exit()
if y == 0:
	print('YES' if del_a % x == 0 else 'NO')
	exit()
print('YES' if del_a % x == 0 and del_b % y == 0 and (del_a // x % 2 == del_b // y % 2) else 'NO')


(a, b, c, d) = map(int, input().split())
(e, f) = map(int, input().split())
a = abs(a - c)
b = abs(b - d)
if a % e == 0 and b % f == 0:
	if abs(a / e - b / f) % 2 == 0:
		print('YES')
		exit()
print('NO')


(x1, y1, x2, y2) = [int(i) for i in input().split()]
(xx, yy) = [int(i) for i in input().split()]
if abs(x1 - x2) % xx != 0 or abs(y1 - y2) % yy != 0:
	print('NO')
elif abs(x1 - x2) / xx % 2 == abs(y1 - y2) / yy % 2:
	print('YES')
else:
	print('NO')


(x1, y1, x2, y2) = map(int, input().split())
(x, y) = map(int, input().split())
k1 = abs(x2 - x1)
k2 = abs(y2 - y1)
if k1 % x or k2 % y:
	print('NO')
else:
	q = k1 // x
	if abs(k2 - y * q) % (2 * y) == 0:
		print('YES')
	else:
		print('NO')


import sys
from bisect import bisect_right as lb
from collections import deque
from queue import PriorityQueue as pq
from math import *
input_ = lambda : sys.stdin.readline().strip('\r\n')
ii = lambda : int(input_())
il = lambda : list(map(int, input_().split()))
ilf = lambda : list(map(float, input_().split()))
ip = lambda : input_()
fi = lambda : float(input_())
ap = lambda ab, bc, cd: ab[bc].append(cd)
li = lambda : list(input_())
pr = lambda x: print(x)
prinT = lambda x: print(x)
f = lambda : sys.stdout.flush()
inv = lambda x: pow(x, mod - 2, mod)
mod = 10 ** 9 + 7
(x1, y1, x2, y2) = il()
(x, y) = il()
if ((x2 - x1) % x == 0 and (y2 - y1) % y == 0) and abs((x2 - x1) // x - (y2 - y1) // y) % 2 == 0:
	print('YES')
else:
	print('NO')


import sys
from math import *

def minp():
	return sys.stdin.readline().strip()

def mint():
	return int(minp())

def mints():
	return map(int, minp().split())
(x1, y1, x2, y2) = mints()
(x, y) = mints()
print(['NO', 'YES'][(x2 - x1) % x == 0 and (y2 - y1) % y == 0 and (((x2 - x1) // x + 1000000) % 2 == ((y2 - y1) // y + 1000000) % 2)])


(x1, y1, x2, y2) = map(int, input().split())
(x, y) = map(int, input().split())
(d1, d2) = (abs(x1 - x2), abs(y1 - y2))
if d1 % x | d2 % y | (d1 // x ^ d2 // y) & 1:
	print('NO')
else:
	print('YES')


(x1, y1, x2, y2) = (int(x) for x in input().split())
(x, y) = (int(x) for x in input().split())

def func():
	print('NO')
d1 = abs(x1 - x2)
d2 = abs(y1 - y2)
if d1 % x == 0 and d2 % y == 0:
	if (d1 / x - d2 / y) % 2 == 0:
		print('YES')
	else:
		func()
else:
	func()


import sys
import bisect
from bisect import bisect_left as lb
from bisect import bisect_right as rb
input_ = lambda : sys.stdin.readline().strip('\r\n')
from math import log
from math import gcd
from math import atan2, acos
from random import randint
sa = lambda : input_()
sb = lambda : int(input_())
sc = lambda : input_().split()
sd = lambda : list(map(int, input_().split()))
sflo = lambda : list(map(float, input_().split()))
se = lambda : float(input_())
sf = lambda : list(input_())
flsh = lambda : sys.stdout.flush()
mod = 10 ** 9 + 7
mod1 = 998244353
gp = []
cost = []
dp = []
mx = []
ans1 = []
ans2 = []
special = []
specnode = []
a = 0
kthpar = []

def dfs(root, par):
	if par != -1:
		dp[root] = dp[par] + 1
	for i in range(1, 20):
		if kthpar[root][i - 1] != -1:
			kthpar[root][i] = kthpar[kthpar[root][i - 1]][i - 1]
	for child in gp[root]:
		if child == par:
			continue
		kthpar[child][0] = root
		dfs(child, root)
ans = 0
b = []

def dfs2(root, par, d):
	global gp, dp
	dp[root] = d
	for child in gp[root]:
		if child == par:
			continue
		dfs2(child, root, d + 1)

def hnbhai(tc):
	(x1, y1, x2, y2) = sd()
	(a, b) = sd()
	x = abs(x1 - x2)
	y = abs(y1 - y2)
	if x % a != 0 or y % b != 0:
		print('NO')
		return
	x = x // a
	y = y // b
	if abs(x - y) % 2 != 0:
		print('NO')
		return
	print('YES')
for _ in range(1):
	hnbhai(_ + 1)


def abs(number):
	if number < 0:
		return -number
	else:
		return number
data = input().split()
move = input().split()
x1 = int(data[0])
y1 = int(data[1])
x2 = int(data[2])
y2 = int(data[3])
mx = int(move[0])
my = int(move[1])
step_x = abs(x2 - x1) / mx
step_y = abs(y2 - y1) / my
result = 0
if int(step_x) == step_x and int(step_y) == step_y:
	i_stepx = int(step_x)
	i_stepy = int(step_y)
	if (i_stepx + i_stepy) % 2 == 0:
		result = 1
if result == 1:
	print('YES')
else:
	print('NO')


(x1, y1, x2, y2) = map(int, input().split())
(x, y) = map(int, input().split())
(a, ra) = divmod(x2 - x1, x)
(b, rb) = divmod(y2 - y1, y)
print('YES' if ra + rb == 0 and a % 2 == b % 2 else 'NO')


from itertools import count
import os
import sys
from io import BytesIO, IOBase
import math
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))

def input():
	return sys.stdin.readline().rstrip('\r\n')
(x1, y1, x2, y2) = map(int, input().split())
(x, y) = map(int, input().split())
cnt1 = 0
cnt2 = 0
c1 = abs(x1 - x2)
c2 = abs(y1 - y2)
if c1 % x == 0:
	cnt1 = c1 // x
else:
	print('NO')
	exit()
if c2 % y == 0:
	cnt2 = c2 // y
else:
	print('NO')
	exit()
if cnt1 % 2 == cnt2 % 2:
	print('YES')
else:
	print('NO')


import math
(x1, y1, x2, y2) = map(int, input().split())
(x, y) = map(int, input().split())
r_x = (x2 - x1) / x
r_y = (y2 - y1) / y
if r_x == math.trunc(r_x) and r_y == math.trunc(r_y):
	if (r_x + r_y) % 2 == 0:
		print('YES')
	else:
		print('NO')
else:
	print('NO')


import sys
import math
input = sys.stdin.readline

def inp():
	return int(input())

def inara():
	return list(map(int, input().split()))

def insr():
	s = input()
	return list(s[:len(s) - 1])

def invr():
	return map(int, input().split())
(a, b, x1, y1) = invr()
(x, y) = invr()
A = abs(x1 - a)
B = abs(y1 - b)
if A % x or B % y:
	print('NO')
else:
	A //= x
	B //= y
	if A % 2 == B % 2:
		print('YES')
	else:
		print('NO')


inp = input().split()
x1 = int(inp[0])
y1 = int(inp[1])
x2 = int(inp[2])
y2 = int(inp[3])
inp = input().split()
x = int(inp[0])
y = int(inp[1])
if abs(x2 - x1) % x == 0 and abs(y2 - y1) % y == 0:
	val1 = abs(x2 - x1) // x
	val2 = abs(y2 - y1) // y
	if abs(val2 - val1) % 2 == 0:
		print('YES')
	else:
		print('NO')
else:
	print('NO')


(x1, y1, x2, y2) = [int(i) for i in input().split()]
(x, y) = [int(i) for i in input().split()]
dx = abs(x2 - x1)
dy = abs(y2 - y1)
if dx % x != 0 or dy % y != 0:
	print('NO')
else:
	kx = dx // x
	ky = dy // y
	if kx % 2 == ky % 2:
		print('YES')
	else:
		print('NO')


(x1, y1, x2, y2) = [int(i) for i in input().split(' ')]
(a, b) = [int(i) for i in input().split(' ')]
dx = abs(x1 - x2)
dy = abs(y1 - y2)
if dx % a == 0 and dy % b == 0 and (dx / a % 2 == dy / b % 2):
	print('YES')
else:
	print('NO')


l = input().split()
a = []
b = []
for i in range(0, 4):
	a.insert(i, int(l[i]))
m = input().split()
for i in range(0, 2):
	b.insert(i, int(m[i]))
x = abs(a[0] - a[2]) % b[0]
y = abs(a[1] - a[3]) % b[1]
z = abs(abs(a[0] - a[2]) / b[0] - abs(a[1] - a[3]) / b[1]) % 2
if x == 0 and y == 0 and (z == 0):
	print('YES')
else:
	print('NO')


xys = list(map(int, input().split()))
bxy = list(map(int, input().split()))
n1 = (xys[2] - xys[0]) / bxy[0]
n2 = (xys[3] - xys[1]) / bxy[1]
if n1 % 1 != 0 or n2 % 1 != 0:
	print('NO')
elif n1 % 2 != n2 % 2:
	print('NO')
else:
	print('YES')


(x1, y1, x2, y2) = map(int, input().split())
(dx, dy) = map(int, input().split())
if (x1 - x2) % dx == 0 and (y1 - y2) % dy == 0 and ((x1 - x2) // dx % 2 == (y1 - y2) // dy % 2):
	print('YES')
else:
	print('NO')


(a, b, xx, yy) = [int(i) for i in input().split()]
(x, y) = [int(i) for i in input().split()]
xx -= a
yy -= b
if xx % (2 * x) == 0 and yy % (2 * y) == 0 or ((xx + x) % (2 * x) == 0 and (y + yy) % (2 * y) == 0):
	print('YES')
else:
	print('NO')


import os
arr = [int(x) for x in input().strip().split()]
step = [int(x) for x in input().strip().split()]
distx = arr[2] - arr[0]
disty = arr[3] - arr[1]
if distx % step[0] == 0 and disty % step[1] == 0:
	if distx / step[0] % 2 == disty / step[1] % 2:
		print('YES')
	else:
		print('NO')
else:
	print('NO')


(x1, y1, x2, y2) = list(map(int, input().split()))
(x, y) = list(map(int, input().split()))
if abs(x2 - x1) % x != 0:
	print('NO')
elif abs(y2 - y1) % y != 0:
	print('NO')
else:
	p = abs(x2 - x1) // x + abs(y2 - y1) // y
	if p % 2 == 0:
		print('YES')
	else:
		print('NO')


(x1, y1, x2, y2) = map(int, input().split())
(x, y) = map(int, input().split())
(a, m1) = (abs(x2 - x1) // x, abs(x2 - x1) % x)
(b, m2) = (abs(y2 - y1) // y, abs(y2 - y1) % y)
if m1 == 0 and m2 == 0:
	if abs(a - b) % 2 == 0:
		print('YES')
	else:
		print('NO')
else:
	print('NO')


import math
(x1, y1, x2, y2) = map(int, input().split())
(x3, y3) = map(int, input().split())
num1 = abs(x2 - x1)
num2 = abs(y2 - y1)
if (num1 % x3 == 0 and num2 % y3 == 0) and num1 // x3 % 2 == num2 // y3 % 2:
	print('YES')
else:
	print('NO')


(x1, y1, x2, y2) = map(int, input().split())
(x, y) = map(int, input().split())
a = abs(x1 - x2)
b = abs(y1 - y2)
if a == 0 and b == 0:
	print('YES')
elif a == 0:
	if b % y != 0:
		print('NO')
	elif b // y % 2 == 0:
		print('YES')
	else:
		print('NO')
elif b == 0:
	if a % x != 0:
		print('NO')
	elif a // x % 2 == 0:
		print('YES')
	else:
		print('NO')
elif a % x != 0 or b % y != 0:
	print('NO')
elif a // x % 2 == b // y % 2:
	print('YES')
else:
	print('NO')


(a, b, z, w) = map(int, input().split())
(x, y) = map(int, input().split())
if abs(z - a) % x == abs(w - b) % y == 0:
	if ((z - a) // x - (w - b) // y) % 2 == 0:
		print('YES')
	else:
		print('NO')
else:
	print('NO')


(x1, y1, x2, y2) = (int(val) for val in input().split())
(x, y) = (int(val) for val in input().split())
x1 = abs(x1 - x2)
y1 = abs(y1 - y2)
if x1 % x == 0 and y1 % y == 0:
	if x1 // x % 2 == y1 // y % 2:
		print('YES')
		exit()
print('NO')


from sys import maxsize, stdout, stdin, stderr
mod = int(1000000000.0 + 7)
import re
tup = lambda : map(int, stdin.readline().split())
I = lambda : int(stdin.readline())
lint = lambda : [int(x) for x in stdin.readline().split()]
S = lambda : stdin.readline().replace('\n', '').strip()

def grid(r, c):
	return [lint() for i in range(r)]

def debug(*args, c=6):
	print('\x1b[3{}m'.format(c), *args, '\x1b[0m', file=stderr)
from math import log2, sqrt
from collections import defaultdict
(x1, y1, x2, y2) = tup()
(x, y) = tup()
if abs(x1 - x2) % x == 0 and abs(y1 - y2) % y == 0:
	if abs(x1 - x2) / x % 2 == abs(y1 - y2) / y % 2:
		print('YES')
	else:
		print('NO')
else:
	print('NO')


def f(l1, l2):
	(x1, y1, x2, y2) = l1
	(x, y) = l2
	if (x2 - x1) % x > 0 or (y2 - y1) % y > 0:
		return False
	sx = (x2 - x1) // x
	sy = (y2 - y1) // y
	return (sx - sy) % 2 == 0
l1 = list(map(int, input().split()))
l2 = list(map(int, input().split()))
print('YES' if f(l1, l2) else 'NO')


inp = list(map(int, input().split()))
(x1, y1, x2, y2) = [inp[i] for i in range(4)]
inp = list(map(int, input().split()))
(x, y) = (inp[0], inp[1])
d1 = x2 - x1
d2 = y2 - y1
if d1 % x == 0 and (int(d1 / x) + int(d2 / y)) % 2 == 0 and (d2 % y == 0):
	print('YES')
else:
	print('NO')


(x, y, x1, y1) = map(int, input().split())
(l, m) = map(int, input().split())
o = (x1 - x) / l
o2 = (y1 - y) / m
if o != (x1 - x) // l or o2 != (y1 - y) // m:
	print('NO')
elif o % 2 == o2 % 2:
	print('YES')
else:
	print('NO')


def main():
	(a, b, c, d) = map(int, input().split())
	(c, d) = (c - a, d - b)
	(x, y) = map(int, input().split())
	if c % x != 0 or d % y != 0:
		print('NO')
	elif c / x % 2 == d / y % 2:
		print('YES')
	else:
		print('NO')
main()


inp = input().split(' ')
inp = list(map(int, inp))
x1 = int(inp[0])
y1 = int(inp[1])
x2 = int(inp[2])
y2 = int(inp[3])
tinp = input().split(' ')
tinp = list(map(int, tinp))
tx = int(tinp[0])
ty = int(tinp[1])
if (x2 - x1) % tx != 0 or (y2 - y1) % ty != 0:
	print('NO')
elif (x2 - x1) // tx % 2 == 0 and (y2 - y1) // ty % 2 == 0 or ((x2 - x1) // tx % 2 != 0 and (y2 - y1) // ty % 2 != 0):
	print('YES')
else:
	print('NO')