A policeman wants to catch a thief. Both the policeman and the thief can only move on a line on integer coordinates between $0$ and $N$ (inclusive).
Initially, the policeman is at a coordinate $x$ and the thief is at a coordinate $y$. During each second, each of them must move to the left or right (not necessarily both in the same direction) by distance $\textbf{exactly}$ equal to $K$. No one may go to the left of the coordinate $0$ or to the right of $N$. Both the policeman and the thief move simultaneously and they cannot meet while moving, only at the end of each second.
Will the policeman be able to catch the thief if they both move optimally? The thief is caught as soon as the policeman and thief meet at the same position at the same time.

-----Input-----
- The first line of the input contains a single integer $T$ denoting the number of test cases. The description of $T$ test cases follows.
- The first and only line of each test case contains four space-separated integers $x$, $y$, $K$ and $N$.

-----Output-----
For each test case, print a single line containing the string "Yes" if the thief can be caught or "No" if the thief cannot be caught (without quotes).

-----Constraints-----
- $1 \le T \le 1,000$
- $1 \le N \le 10^9$
- $1 \le K \le N$
- $0 \le x, y \le N$
- $x \neq y$

-----Example Input-----
5
0 1 1 1
1 4 1 5
4 2 1 7
3 7 2 10
8 2 3 15

-----Example Output-----
No
No
Yes
Yes
Yes

-----Explanation-----
Example case 1: The policeman is at $0$ and the thief is at $1$. After the $1$-st second, the policeman is at $1$ and the thief is at $0$. After the next second, the policeman is again at $0$ and the thief at $1$. They cannot end up at the same coordinate.

Difficulty: interview

Starter code:

Solutions:
t = int(input())
for _ in range(t):
 x, y, k, n = [int(x) for x in input().split()]
 k = k*2
 temp = abs(x-y)
 if(temp%k == 0):
  print("Yes")
 else:
  print("No")


t = int(input())

for _ in range(t):
 x, y, k, n = [int(x) for x in input().split()]
 k = k*2
 temp = abs(x-y)
 if(temp%k == 0):
  print("Yes")
 else:
  print("No")

# cook your dish here
t = int(input())
for j in range(t):
 (x, y, K, N) = list(map(int, input().split(' ')))
 val = abs(x-y)
 if val%K==0:
  if (val/K)%2 == 0:
   print('Yes')
  else:
   print('No')
 else:
  print('No')
   
  


try:
 t=int(input())
 while t>0:
  [x,y,K,N]=[int(x) for x in input().split()]
  if abs(x-y)%(2*K)==0:
   print('Yes')
  else:
   print('No')
  t-=1
except:
 pass

t=int(input())
for i in range(t):
 x,y,K,N=list(map(int,input().split()))
 
 if (abs(x-y) %(2*K)==0):
  print('Yes')
 else:
  print('No') 

for _ in range(int(input())):
 x,y,k,n = map(int,input().split())
 if(abs(x-y)%k==0):
  if((abs(x-y)/k)%2==0):
   print("Yes")
  else:
   print("No")
 else:
  print("No")

# cook your dish here
for _ in range(int(input())):
 x,y,k,n=list(map(int,input().split()))
 diff=abs(x-y)
 if (diff%(2*k))==0:
  print("Yes")
 else:
  print("No")


# cook your dish here
for _ in range(int(input())):
 x,y,k,n = map(int,input().split())
 dis = abs(x-y)
 k *= 2
 if dis % k:
  print("No")
 else:
  print("Yes")

for _ in range(int(input())):
 x,y,k,n = map(int,input().split())
 a = abs(x-y)/2
 
 if a%k ==0:
  print("Yes")
 else:
  print("No")

for _ in range(int(input())):
 x,y,k,n = list(map(int,input().split()))
 a = abs(x-y)/2
 
 if a%k ==0:
  print("Yes")
 else:
  print("No")

 # cook your dish here


for _ in range(int(input())):
 x,y,k,n = list(map(int,input().split()))
 a = abs(x-y)/2
 if abs(x-y)%2 ==0:
  if a%k ==0:
   print("Yes")
  else:
   print("No")
 else:
  print("No")

 # cook your dish here


def solve(x,y,k,n):
 val=abs(x-y)
 if val%k==0:
  if (val/k)%2==0:
   print('Yes')
  else:
   print('No')
 else:
  print('No')
t=int(input())
for i in range(t):
 x,y,k,n=map(int,input().split())
 solve(x,y,k,n)

def solve(x,y,k,n):
 val=abs(x-y)
 if val%k==0:
  if (val/k)%2==0:
   print('Yes')
  else:
   print('No')
 else:
  print('No')
t=int(input())
for i in range(t):
 x,y,k,n=map(int,input().split())
 solve(x,y,k,n)

# cook your dish here
t=int(input())
for _ in range(t):
 x,y,k,n=map(int,input().split())
 if(y > x):
  time=(n-y)//k
  yfinal=y+time*k
  xnet=x+time*k
  diff=yfinal-xnet
  if(diff % (2*k)==0):
   print("Yes")
  else:
   print("No")
 elif(x > y):
  time=(y-0)//k
  yfinal=y-time*k
  xnet=x-time*k
  diff=xnet-yfinal
  if(diff%(2*k)==0):
   print("Yes")
  else:
   print("No")

for _ in range(int(input())):
 a, b, k, n = map(int, input().split())
 val = abs(a - b)
 if((val/k)%2 == 0):
  print("Yes")
 else:
  print("No")

for _ in range(int(input())):
 a, b, k, n = map(int, input().split())
 val = abs(a - b)
 if(val%k == 0):
  if((val/k)%2 == 0):
   print("Yes")
  else:
   print("No")
 else:
  print("No")

for _ in range(int(input())):
 x,y,k,n = list(map(int,input().split()))
 if abs(x-y)%(2*k)!=0:
  print('No')
 else:
  print('Yes')


# cook your dish here

for TC in range(int(input())):
 x,y,k,n = list(map(int,input().split()))
 
 if abs(x-y)%(2*k)!=0:
  print('No')
 else:
  print('Yes')


for q in range(int(input())):
 x, y, k, n = [int(z) for z in input().split()]
 a=max(x,y)
 b=min(x,y)
 if(((a-b)/2)%k==0):
  print('Yes')
 else:
  print('No')


# cook your dish here
t=int(input())
for i in range(t):
 x,y,k,n=list(map(int,input().split()))
 val = abs(x-y)
 if(val%k==0):
  if((val/k)%2==0):
   print("Yes")
  else:
   print("No")
 else:
  print("No")
 
   
   
  
 


# cook your dish here
t = int(input())
for _ in range(t):
 x,y,K,N = map(int,input().split())
 if abs(x-y) %2 != 0:
  print("No")
 else:
  if abs(x-y) % K == 0 and (abs(x-y) // K) % 2 == 0 :
   print("Yes")
  else:
   print("No")

# cook your dish here
t = int(input())
for _ in range(t):
 x,y,K,N = map(int,input().split())
 if abs(x-y) %2 != 0:
  print("No")
 else:
  if abs(x-y) % K == 0 and (abs(x-y) // K) % 2 == 0 :
   print("Yes")
  else:
   print("No")

# cook your dish here
t = int(input())
for _ in range(t):
 x,y,K,N = map(int,input().split())
 if abs(x-y) %2 != 0:
  print("No")
 else:
  if abs(x-y) % K == 0 and (abs(x-y) // K) % 2 == 0:
   print("Yes")
  else:
   print("No")


def readintarray():
 return [int(s) for s in input().strip().split(" ")]
 
def solve(x, y, k, n):
 if abs(y - x) % k != 0:
  return False
 z = abs(y - x) // k
 return z % 2 == 0
 

for _ in range(int(input())):
 x, y, k, n = readintarray()
 print("Yes" if solve(x, y, k, n) else "No")

try:
 t=int(input())
 while(t):
  x,y,k,n=input().split()
  n=int(n)
  k=int(k)
  x=int(x)
  y=int(y)
  if (x-y)%(2*k)==0:
   print("Yes")
  else:
   print("No")
   
  t-=1
except:
 pass