Nastya just made a huge mistake and dropped a whole package of rice on the floor. Mom will come soon. If she sees this, then Nastya will be punished.

In total, Nastya dropped $n$ grains. Nastya read that each grain weighs some integer number of grams from $a - b$ to $a + b$, inclusive (numbers $a$ and $b$ are known), and the whole package of $n$ grains weighs from $c - d$ to $c + d$ grams, inclusive (numbers $c$ and $d$ are known). The weight of the package is the sum of the weights of all $n$ grains in it.

Help Nastya understand if this information can be correct. In other words, check whether each grain can have such a mass that the $i$-th grain weighs some integer number $x_i$ $(a - b \leq x_i \leq a + b)$, and in total they weigh from $c - d$ to $c + d$, inclusive ($c - d \leq \sum\limits_{i=1}^{n}{x_i} \leq c + d$).


-----Input-----

The input consists of multiple test cases. The first line contains a single integer $t$ $(1 \leq t \leq 1000)$  — the number of test cases. 

The next $t$ lines contain descriptions of the test cases, each line contains $5$ integers: $n$ $(1 \leq n \leq 1000)$  — the number of grains that Nastya counted and $a, b, c, d$ $(0 \leq b < a \leq 1000, 0 \leq d < c \leq 1000)$  — numbers that determine the possible weight of one grain of rice (from $a - b$ to $a + b$) and the possible total weight of the package (from $c - d$ to $c + d$).


-----Output-----

For each test case given in the input print "Yes", if the information about the weights is not inconsistent, and print "No" if $n$ grains with masses from $a - b$ to $a + b$ cannot make a package with a total mass from $c - d$ to $c + d$.


-----Example-----
Input
5
7 20 3 101 18
11 11 10 234 2
8 9 7 250 122
19 41 21 321 10
3 10 8 6 1

Output
Yes
No
Yes
No
Yes



-----Note-----

In the first test case of the example, we can assume that each grain weighs $17$ grams, and a pack $119$ grams, then really Nastya could collect the whole pack.

In the third test case of the example, we can assume that each grain weighs $16$ grams, and a pack $128$ grams, then really Nastya could collect the whole pack.

In the fifth test case of the example, we can be assumed that $3$ grains of rice weigh $2$, $2$, and $3$ grams, and a pack is $7$ grams, then really Nastya could collect the whole pack.

In the second and fourth test cases of the example, we can prove that it is impossible to determine the correct weight of all grains of rice and the weight of the pack so that the weight of the pack is equal to the total weight of all collected grains.

Source: codeforces | Difficulty: EASY
Tags: Mathematics


Solutions:
t = int(input())
for i in range(t):
	(n, a, b, c, d) = [int(i) for i in input().split()]
	first = a - b
	sec = a + b
	third = c - d
	four = c + d
	q = first * n
	w = sec * n
	if w < c - d or c + d < q:
		print('No')
	else:
		print('Yes')


for _ in range(int(input())):
	arr = list(map(int, input().rstrip().rsplit()))
	(n, a, b, c, d) = (arr[0], arr[1], arr[2], arr[3], arr[4])
	(w1, w2, w3, w4) = (n * (a - b), n * (a + b), c - d, c + d)
	if w1 <= w4 and w2 >= w3:
		if w1 <= w3 and w2 <= w4 or (w1 >= w3 and w2 >= w4) or (w1 < w3 and w2 > w4) or (w1 > w3 and w2 < w4):
			print('Yes')
		else:
			print('No')
	else:
		print('No')


for _ in range(int(input())):
	li = list(map(int, input().split()))
	flag = 1
	n = li[0]
	a = li[1] - li[2]
	b = li[1] + li[2]
	c = li[3] - li[4]
	d = li[3] + li[4]
	if b * n < c:
		print('No')
	elif a * n > d:
		print('No')
	else:
		print('Yes')


for _ in range(int(input())):
	(n, a, b, c, d) = map(int, input().split())
	if (a + b) * n < c - d or (a - b) * n > c + d:
		print('NO')
	else:
		print('YES')


def input_num_list():
	s = input().split(' ')
	L = []
	for e in s:
		L.append(int(e))
	return L

def inti():
	return int(input())
T = inti()
for t in range(1, T + 1):
	(n, a, b, c, d) = input_num_list()
	grain_min = a - b
	grain_max = a + b
	pkg_min = c - d
	pkg_max = c + d
	pkg_total_min = n * grain_min
	pkg_total_max = n * grain_max
	if pkg_total_max < pkg_min or pkg_max < pkg_total_min:
		print('No')
	else:
		print('Yes')


for _ in range(int(input())):
	(n, a, b, c, d) = (int(x) for x in input().split())
	if (c - d - (a - b) * n) * (c - d - (a + b) * n) <= 0 or (c + d - (a - b) * n) * (c + d - (a + b) * n) <= 0 or (c - d <= (a - b) * n and c + d >= (a + b) * n):
		print('Yes')
	else:
		print('No')


t = int(input())
for _ in range(t):
	(n, a, b, c, d) = map(int, input().split())
	ok = False
	if n * (a - b) >= c - d and n * (a - b) <= c + d:
		ok = True
	if n * (a + b) >= c - d and n * (a - b) <= c + d:
		ok = True
	if ok:
		print('Yes')
	else:
		print('No')


import math as mt
import sys, string, bisect
input = sys.stdin.readline
import random
from collections import deque, defaultdict
L = lambda : list(map(int, input().split()))
Ls = lambda : list(input().split())
M = lambda : map(int, input().split())
I = lambda : int(input())

def intersection(l1, r1, l2, r2):
	if l1 <= l2:
		if l2 <= r1:
			return True
		else:
			return False
	elif l1 <= r2:
		return True
	else:
		return False

def s(n):
	return n * (n + 1) // 2
t = I()
for _ in range(t):
	(n, a, b, c, d) = M()
	i = a - b
	f = 1
	if intersection(n * (a - b), n * (a + b), c - d, c + d):
		print('Yes')
	else:
		print('No')


t = int(input())
for i in range(t):
	(n, a, b, c, d) = [int(i) for i in input().split()]
	if (a - b) * n <= c + d and (a + b) * n >= c - d:
		print('Yes')
	else:
		print('No')


for _ in range(int(input())):
	(n, a, b, c, d) = map(int, input().split())
	if n * (a + b) < c - d or n * (a - b) > c + d:
		print('No')
	else:
		print('Yes')


t = int(input())
while t:
	t = t - 1
	(n, a, b, c, d) = map(int, input().split())
	x = (a - b) * n
	y = (a + b) * n
	p = c + d
	q = c - d
	if x >= q and x <= p or (y >= q and y <= p) or (x <= q and y >= p):
		print('Yes')
	else:
		print('No')


t = int(input())
for i in range(t):
	(n, a, b, c, d) = map(int, input().split())
	(a, b) = (a - b, a + b)
	if n * a >= c - d and n * a <= c + d or (n * b >= c - d and n * b <= c + d) or (n * a <= c - d and n * b >= c - d):
		print('YES')
	else:
		print('NO')


t = int(input())
for var in range(t):
	(n, a, b, c, d) = map(int, input().split())
	lst = [a - b] * n
	k = 0
	aa = a + b
	cc = c + d
	while k != n + 1:
		xxx = c - d - sum(lst)
		if k == n:
			if sum(lst) > cc or sum(lst) < c - d:
				print('No')
				break
		if sum(lst) > cc:
			print('No')
			break
		elif sum(lst) <= cc and sum(lst) >= c - d:
			print('Yes')
			break
		elif lst[k] + xxx <= aa:
			lst[k] += xxx
		else:
			lst[k] = aa
		k += 1


k = list(map(int, input().split()))
t = k[0]
for i in range(t):
	s = list(map(int, input().split()))
	n = s[0]
	a = s[1]
	b = s[2]
	c = s[3]
	d = s[4]
	if (a - b) * n > c + d or (a + b) * n < c - d:
		print('no')
	else:
		print('yes')


import collections

def solve(n, a, b, c, d):
	smallestPossibleW = a - b
	highestPossibleW = a + b
	if n * smallestPossibleW > c + d or n * highestPossibleW < c - d:
		return 'No'
	return 'Yes'
t = int(input().strip())
for i in range(t):
	[n, a, b, c, d] = list(map(int, input().strip().split()))
	print(solve(n, a, b, c, d))


t = int(input())
for i in range(t):
	s = input().split()
	n = int(s[0])
	a = int(s[1])
	b = int(s[2])
	c = int(s[3])
	d = int(s[4])
	k_min = n * (a - b)
	k_max = n * (a + b)
	if k_min < c - d and k_max < c - d:
		print('No')
	elif k_min > c + d and k_max > c + d:
		print('No')
	else:
		print('Yes')


import sys
t = int(input())
for i in range(t):
	(n, a, b, c, d) = list(map(int, sys.stdin.readline().strip().split()))
	if n * (a + b) >= c - d and n * (a - b) <= c + d:
		print('YES')
	else:
		print('NO')


import sys
input = sys.stdin.readline
for _ in range(int(input())):
	(n, a, b, c, d) = map(int, input().split())
	if (a - b) * n <= c + d and (a + b) * n >= c - d:
		print('YES')
	else:
		print('NO')


import sys
from collections import deque, Counter
inp = sys.stdin.readline
read = lambda : list(map(int, inp().split()))

def a():
	ans = ''
	for _ in range(int(inp())):
		(n, a, b, c, d) = read()
		mi = (a - b) * n
		ma = (a + b) * n
		ans += 'YNEOS'[not (c - d <= mi <= c + d or c - d <= ma <= c + d or mi <= c - d <= ma or (mi <= c + d <= ma))::2] + '\n'
	print(ans)
a()


t = int(input())
for i in range(t):
	(n, a, b, c, d) = map(int, input().split())
	x = n * (a - b)
	y = n * (a + b)
	flag = 0
	for z in range(x, y + 1):
		if c - d <= z <= c + d:
			flag = 1
			break
		elif c + d < z:
			break
	if flag == 1:
		print('Yes')
	else:
		print('No')


def f(n, a, b, c, d):
	return n * (a - b) <= c + d and n * (a + b) >= c - d
dic = dict()
dic[True] = 'Yes'
dic[False] = 'No'
t = int(input())
for _ in range(t):
	(n, a, b, c, d) = tuple(map(int, input().split()))
	res = f(n, a, b, c, d)
	print(dic[res])


def func(tpl):
	(n, a, b, c, d) = tpl
	k = a - b
	e = c - n * k
	if 0 < e - d:
		if e - d > 2 * n * b:
			return False
		return True
	elif e - d <= 0 <= e + d:
		if e - d <= 2 * b * n:
			return True
		return False
	return False
t = int(input())
res = []
for i in range(t):
	tmp = func(tuple(map(int, input().split())))
	if tmp:
		res.append('Yes')
	else:
		res.append('No')
for val in res:
	print(val)


import math

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

def list_input():
	return list(map(int, input().split()))
for nt in range(int(input())):
	(n, a, b, c, d) = mult_input()
	x = a - b
	y = a + b
	if n * x > c + d or n * y < c - d:
		print('No')
	else:
		print('Yes')


t = int(input())
for q in range(t):
	(n, a, b, c, d) = list(map(int, input().split(' ')))
	if n * (a - b) >= c - d and n * (a - b) <= c + d or (n * (a + b) >= c - d and n * (a - b) <= c + d):
		print('Yes')
	else:
		print('No')


n = int(input())
string = []
for i in range(0, n):
	string.append(list(map(int, input().strip().split())))
for i in range(0, n):
	minimum_i = (string[i][1] - string[i][2]) * string[i][0]
	maximum_i = (string[i][1] + string[i][2]) * string[i][0]
	minimum_tot = string[i][3] - string[i][4]
	maximum_tot = string[i][3] + string[i][4]
	if maximum_i < minimum_tot:
		print('No')
	elif minimum_i > maximum_tot:
		print('No')
	else:
		print('Yes')


testcase = int(input())
for i in range(testcase):
	(n, a, b, c, d) = list(map(int, input().split()))
	if n * (a + b) >= c - d and n * (a - b) <= c + d:
		print('YES')
	else:
		print('NO')


total = int(input())
for _ in range(total):
	seq = list(map(int, input().split()))
	(n, a, b, c, d) = (seq[0], seq[1], seq[2], seq[3], seq[4])
	if n * (a - b) > c + d or n * (a + b) < c - d:
		print('NO')
		continue
	print('YES')


import sys
aggk = int(input())
for HelloMyFriend in range(aggk):
	(n, a, b, c, d) = map(int, input().split())
	maxs = c + d
	mins = c - d
	minv = a - b
	maxv = a + b
	if n * minv >= mins and n * minv <= maxs:
		print('Yes')
		continue
	elif n * minv >= mins:
		print('No')
		continue
	elif n * maxv >= mins and n * maxv <= maxs:
		print('Yes')
		continue
	elif n * maxv <= maxs:
		print('No')
		continue
	elif n * minv <= mins and n * maxv >= maxs:
		print('Yes')
		continue
	else:
		while True:
			g = 1


T = int(input())
for _ in range(T):
	(n, a, b, c, d) = input().split()
	n = int(n)
	a = int(a)
	b = int(b)
	c = int(c)
	d = int(d)
	l = (a - b) * n
	r = (a + b) * n
	L = c - d
	R = c + d
	flag = 0
	if r >= L and l <= L:
		print('Yes')
	elif R >= l and L <= l:
		print('Yes')
	else:
		print('No')


def Grains():
	(n, a, b, c, d) = list(map(int, input().split()))
	if n * (a - b) < c - d and n * (a + b) < c - d:
		print('No')
	elif n * (a - b) > c + d and n * (a + b) > c + d:
		print('No')
	else:
		print('Yes')
for i in range(int(input())):
	Grains()


for i1 in range(int(input())):
	l = list(map(int, input().split()))
	n = l[0]
	min1 = (l[1] - l[2]) * n
	max1 = (l[1] + l[2]) * n
	min2 = l[3] - l[4]
	max2 = l[3] + l[4]
	f1 = 1
	if min1 > max2 or max1 < min2:
		f1 = 0
	if f1 == 1:
		print('Yes')
	else:
		print('No')


for i in range(int(input())):
	(t, a, b, c, d) = map(int, input().split())
	if (a + b) * t < c - d or (a - b) * t > c + d:
		print('No')
	else:
		print('Yes')


for _ in range(int(input())):
	(n, a, b, c, d) = map(int, input().split())
	p = c + d
	q = c - d
	m = 0
	t = (a - b) * n
	y = (a + b) * n
	if q > y or p < t:
		print('No')
	else:
		print('Yes')


for i in range(int(input())):
	(n, a, b, c, d) = map(int, input().split())
	low = a - b
	high = a + b
	glow = c - d
	ghigh = c + d
	if n * low > ghigh or n * high < glow:
		print('No')
	else:
		print('Yes')


for _ in range(int(input())):
	(n, a, b, c, d) = list(map(int, input().strip().split()))
	if n * (a - b) > c + d:
		print('No')
	elif n * (a + b) < c - d:
		print('No')
	else:
		print('Yes')


import sys
input = sys.stdin.buffer.readline
T = int(input())
for _ in range(1, T + 1):
	(n, a, b, c, d) = map(int, input().split())
	min = c - d
	max = c + d
	minrice = (a - b) * n
	maxrise = (a + b) * n
	if min <= minrice <= max or min <= maxrise <= max or (minrice <= min and max <= maxrise):
		print('Yes')
	else:
		print('No')


t = int(input())
for i in range(t):
	(n, a, b, c, d) = [int(m) for m in input().split()]
	l = a - b
	r = a + b
	L = c - d
	R = c + d
	if r * n >= R >= l * n:
		print('Yes')
		continue
	elif L <= l * n <= r * n <= R:
		print('Yes')
		continue
	elif l * n <= L <= r * n <= R:
		print('Yes')
		continue
	else:
		print('No')


t = int(input())
for i in range(t):
	(n, a, b, c, d) = map(int, input().split())
	k = a - b
	j = a + b
	l = c - d
	p = c + d
	if n * j >= l and n * k <= p:
		print('YES')
	else:
		print('NO')


def solve(n, a, b, c, d):
	mn = (a - b) * n
	mx = (a + b) * n
	mnp = c - d
	mxp = c + d
	if mn <= mnp <= mx or mn <= mxp <= mx or mnp <= mn <= mxp or (mnp <= mx <= mxp):
		return 'Yes'
	else:
		return 'No'
[print(solve(*map(int, input().split()))) for _ in range(int(input()))]


for _ in range(int(input())):
	(n, a, b, c, d) = list(map(int, input().split()))
	(w1, w2) = ((a - b) * n, (a + b) * n)
	(po1, po2) = (c - d, c + d)
	if w2 < po1 or w1 > po2:
		print('No')
	else:
		print('Yes')


t = int(input())
for _ in range(t):
	(n, a, b, c, d) = map(int, input().split())
	x = n * (a - b)
	y = n * (a + b)
	p = c - d
	q = c + d
	if x < p and y < p:
		print('No')
		continue
	if x > q and y > q:
		print('No')
		continue
	print('Yes')


from collections import deque
from collections import OrderedDict
import math
import sys
import os
from io import BytesIO
for t in range(int(input())):
	(n, a, b, c, d) = map(int, input().split())
	lz = max(1, a - b)
	rz = a + b
	lu = max(1, c - d)
	ru = c + d
	lz = lz * n
	rz = rz * n
	if lz >= lu and lz <= ru:
		print('YES')
	elif rz >= lu and rz <= ru:
		print('YES')
	elif lz < lu and rz > ru:
		print('YES')
	else:
		print('NO')


from sys import stdin
input = stdin.readline
for t in range(int(input())):
	(n, a, b, c, d) = map(int, input().split())
	c1 = (a - b) * n <= c - d or (a - b) * n <= c + d
	c2 = (a + b) * n >= c - d or (a + b) * n >= c + d
	c = (a - b) * n == c - d or (a - b) * n == c + d or (a + b) * n == c - d or ((a + b) * n == c + d)
	if c:
		print('YES')
	elif c1 and c2:
		print('YES')
	else:
		print('NO')


def solve(n, a, b, c, d):
	(x, y) = (n * (a - b), n * (a + b))
	return 'Yes' if max(x, c - d) <= min(y, c + d) else 'No'
t = int(input())
for i in range(t):
	print(solve(*list(map(int, input().split()))))


def solve(n, a, b, c, d):
	total_max = c + d
	total_min = c - d
	each_max = a + b
	each_min = a - b
	t_each_max = n * each_max
	t_each_min = n * each_min
	if t_each_max < total_min:
		return 'NO'
	if t_each_min > total_max:
		return 'NO'
	return 'YES'

def main():
	t = int(input())
	for i in range(t):
		d = input()
		d = [int(i) for i in d.split()]
		n = d[0]
		a = d[1]
		b = d[2]
		c = d[3]
		d = d[4]
		ans = solve(n, a, b, c, d)
		print(ans)
main()


import sys
from os import path
if path.exists('C:/Users/prana/Desktop/sublime/input.txt'):
	sys.stdin = open('C:/Users/prana/Desktop/sublime/input.txt', 'r')
	sys.stdout = open('C:/Users/prana/Desktop/sublime/output.txt', 'w')

def solve():
	q = list(map(int, input().split()))
	n = q[0]
	a = q[1]
	b = q[2]
	c = q[3]
	d = q[4]
	mi = (a - b) * n
	ma = (a + b) * n
	an = c - d
	ans = c + d
	if mi < an and ma < an or (mi > ans and ma > ans):
		print('no')
	else:
		print('yes')
T = 1
T = int(input())
for _ in range(1, T + 1):
	print('Case #', _, file=sys.stderr)
	solve()


t = int(input())
for i in range(0, t):
	(n, a, b, c, d) = list(map(int, input().split()))
	m1 = c - d
	m2 = c + d
	m1 = (c - d) // n
	if (c - d) % n != 0:
		m1 += 1
	m2 = (c + d) // n
	if m1 > a + b or m2 < a - b:
		print('No')
	else:
		print('Yes')


for _ in range(int(input())):
	(n, a, b, c, d) = list(map(int, input().split()))
	(x1, y1) = ((a - b) * n, (a + b) * n)
	(x2, y2) = (c - d, c + d)
	if y1 >= x2 and y2 >= x1:
		print('Yes')
	else:
		print('No')


for i in range(int(input())):
	(n, a, b, c, d) = map(int, input().split())
	m1 = (a - b) * n
	m2 = (a + b) * n
	m3 = c - d
	m4 = c + d
	if m2 < m3 or m4 < m1:
		print('No')
	else:
		print('Yes')


T = int(input())
while T:
	(n, a, b, c, d) = map(int, input().split())
	grainMax = a + b
	grainMin = a - b
	bagMax = c + d
	bagMin = c - d
	if n * grainMax >= bagMin and n * grainMin <= bagMax:
		print('Yes')
	else:
		print('No')
	T -= 1


ans = []
for _ in range(int(input())):
	(n, a, b, c, d) = map(int, input().split())
	(mini, maxi) = (n * (a - b), n * (a + b))
	(low, upp) = (c - d, c + d)
	flag = 0
	for p in (low, upp):
		if mini <= p <= maxi and (not flag):
			flag = 1
	for m in (mini, maxi):
		if low <= m <= upp and (not flag):
			flag = 1
	ans.append(['No', 'Yes'][flag])
print('\n'.join(ans))


for t in range(int(input())):
	(n, a, b, c, d) = map(int, input().split())
	x = ((a - b) * n, (a + b) * n)
	y = (c - d, c + d)
	print(['No', 'Yes'][max(min(x), min(y)) <= min(max(x), max(y))])


T = int(input())
for i in range(T):
	(n, a, b, c, d) = map(int, input().split())
	R = n * (a + b)
	L = n * (a - b)
	if R >= c - d and L <= c + d:
		print('YES')
	else:
		print('NO')


def solve(n, a, b, c, d):
	st = (a - b) * n
	et = (a + b) * n
	sg = c - d
	eg = c + d
	if et < sg or eg < st:
		return 'NO'
	else:
		return 'YES'
t = int(input())
while t:
	(n, a, b, c, d) = map(int, input().split(' '))
	print(solve(n, a, b, c, d))
	t -= 1


import math
t = int(input())
for i in range(t):
	(n, a, b, c, d) = list(map(int, input().split()))
	if n * (a - b) > c + d or n * (a + b) < c - d:
		print('NO')
	else:
		print('YES')


cases = int(input())
for i in range(cases):
	l1 = input().split(' ')
	n = int(l1[0])
	a = int(l1[1])
	b = int(l1[2])
	c = int(l1[3])
	d = int(l1[4])
	mig = a - b
	mag = a + b
	mi_p = c - d
	ma_p = c + d
	if n * mig > ma_p or n * mag < mi_p:
		print('No')
	else:
		print('Yes')


for _ in range(int(input())):
	(n, a, b, c, d) = map(int, input().split())
	f = 0
	(mi, ma) = (n * (a - b), n * (a + b))
	(tmi, tma) = (c - d, c + d)
	if mi > tma or ma < tmi:
		print('No')
	else:
		print('Yes')


import sys

def read_int():
	return int(sys.stdin.readline())

def read_ints():
	return list(map(int, sys.stdin.readline().split()))
t = read_int()
for j in range(t):
	(n, a, b, c, d) = read_ints()
	res = 'Yes' if n * (a - b) <= c + d and n * (a + b) >= c - d else 'No'
	print(res)


class Solution:

	def solve(self, n, a, b, c, d):
		(l, r) = (c - d, c + d)
		return 'No' if (a - b) * n > r or (a + b) * n < l else 'Yes'

	def __init__(self):
		test = int(input())
		for t in range(0, test):
			(n, a, b, c, d) = list(map(int, input().split()))
			print(self.solve(n, a, b, c, d))
Solution()


t = int(input())
for _ in range(t):
	(n, a, b, c, d) = map(int, input().split(' '))
	p = n * (a - b)
	pa = n * (a + b)
	f = 0
	if c - d > p and c - d > pa and (c + d > p) and (c + d > pa) or (c - d < p and c - d < pa and (c + d < p) and (c + d < pa)):
		print('No')
	else:
		print('Yes')


k = int(input())
for i in range(k):
	(n, a, b, c, d) = map(int, input().split())
	f_low = (a - b) * n
	f_high = (a + b) * n
	s_low = c - d
	s_high = c + d
	if f_low > s_high or f_high < s_low:
		print('No')
	else:
		print('Yes')


n = int(input())
for i in range(n):
	a = [int(x) for x in input().split()]
	if (a[1] + a[2]) * a[0] >= a[3] - a[4] and (a[1] - a[2]) * a[0] <= a[3] + a[4]:
		print('Yes')
	else:
		print('No')


tests_num = int(input())
tests = []
for t in range(tests_num):
	tests.append([int(x) for x in input().split()])

def main():
	for test in tests:
		grain_min = test[1] - test[2]
		grain_max = test[1] + test[2]
		min_sum_grain = grain_min * test[0]
		max_sum_grain = grain_max * test[0]
		pack_min = test[3] - test[4]
		pack_max = test[3] + test[4]
		if min_sum_grain > pack_max or max_sum_grain < pack_min:
			print('No')
		else:
			print('Yes')
main()


t = int(input())
for i in range(t):
	(n, a, b, c, d) = map(int, input().split())
	min_now = (a - b) * n
	max_now = (a + b) * n
	min_ob = c - d
	max_ob = c + d
	if min_now > max_ob or max_now < min_ob:
		print('No')
	else:
		print('Yes')


for _ in range(int(input())):
	a = input().split(' ')
	n = int(a[0])
	x = int(a[1])
	b = int(a[2])
	c = int(a[3])
	d = int(a[4])
	a = x
	val1 = (c + d) / (a - b)
	val2 = (c - d) / (a + b)
	if val1 >= n >= val2:
		print('Yes')
	else:
		print('No')


testCases = int(input())
while testCases:
	(n, a, b, c, d) = list(map(int, input().split()))
	minPossibleWeight = (a - b) * n
	maxPossibleWeight = (a + b) * n
	minTotalWeight = c - d
	maxTotalWeight = c + d
	if maxPossibleWeight >= minTotalWeight and minPossibleWeight <= maxTotalWeight:
		print('Yes')
	else:
		print('No')
	testCases -= 1


t = int(input())
while t > 0:
	(n, a, b, c, d) = map(int, input().split())
	if n * (a + b) < c - d or n * (a - b) > c + d:
		print('No')
	else:
		print('Yes')
	t -= 1


t = int(input())
for i in range(t):
	(n, a, b, c, d) = [int(x) for x in input().split()]
	x = n * (a - b)
	y = n * (a + b)
	if x >= c - d and x <= c + d:
		print('Yes')
		continue
	elif x < c - d and y < c - d:
		print('No')
		continue
	elif x >= c - d and x >= c + d:
		print('No')
		continue
	else:
		print('Yes')


import sys, math
t = int(sys.stdin.readline())
for _ in range(t):
	(n, a, b, c, d) = map(int, sys.stdin.readline().split())
	if (a - b) * n > c + d or (a + b) * n < c - d:
		print('NO')
	else:
		print('YES')


test_case = int(input())
for i in range(test_case):
	(n, a, b, c, d) = [int(b) for b in input().split()]
	k = a - b
	l = a + b
	x = c - d
	y = c + d
	if k * n > y or l * n < x:
		print('NO')
	else:
		print('YES')


import math
LI = lambda : list(map(int, input().split()))
MI = lambda : map(int, input().split())
yes = lambda : print('YES')
no = lambda : print('NO')
I = lambda : list(input())
J = lambda x: ''.join(x)
II = lambda : int(input())
SI = lambda : input()
t = II()
for q in range(t):
	(n, a, b, c, d) = MI()
	if (a - b) * n > c + d or (a + b) * n < c - d:
		no()
	else:
		yes()


t = int(input())
while t > 0:
	t -= 1
	d = input().split()
	n = int(d[0])
	a = int(d[1])
	b = int(d[2])
	c = int(d[3])
	d = int(d[4])
	if c - d > n * (a + b) or c + d < n * (a - b):
		print('No')
		continue
	print('Yes')


t = int(input())
for k in range(t):
	l = list(map(int, input().split()))
	n = l[0]
	a = l[1]
	b = l[2]
	c = l[3]
	d = l[4]
	val = 0
	mval = (a + b) * n
	lval = (a - b) * n
	for i in range(c - d, c + d + 1):
		if i <= mval and i >= lval:
			val = val + 1
			break
	if val > 0:
		print('Yes')
	else:
		print('No')


for i in range(int(input())):
	(n, a, b, c, d) = map(int, input().split())
	L = n * (a - b)
	R = n * (a + b)
	if R < c - d or c + d < L:
		print('No')
	else:
		print('Yes')


import collections
import operator
n = int(input())
for i in range(n):
	mk = [int(i) for i in input().split(' ')]
	m = mk[0]
	a = mk[1]
	b = mk[2]
	c = mk[3]
	d = mk[4]
	minw = a - b
	maxw = a + b
	mins = c - d
	maxs = c + d
	if minw * m <= maxs and maxw * m >= mins:
		print('YES')
	else:
		print('NO')


n = int(input())
for i in range(n):
	d = list(map(int, input().split()))
	leftRight = [d[0] * (d[1] - d[2]), d[0] * (d[1] + d[2])]
	possibleItemsRange = [d[3] - d[4], d[3] + d[4]]
	if possibleItemsRange[0] > leftRight[1] or possibleItemsRange[1] < leftRight[0]:
		print('No')
	else:
		print('Yes')


t = int(input())
for _ in range(t):
	a = list(map(int, input().split()))
	ab1 = abs(a[1] - a[2])
	ab2 = abs(a[1] + a[2])
	cd1 = abs(a[3] - a[4])
	cd2 = abs(a[3] + a[4])
	mi = ab1 * a[0]
	ma = ab2 * a[0]
	if mi > cd2 or ma < cd1:
		print('No')
	else:
		print('Yes')


import sys
input = lambda : sys.stdin.readline().strip()
t = int(input())
while t:
	t -= 1
	(n, a, b, c, d) = map(int, input().split())
	mi = n * (a - b)
	ma = n * (a + b)
	found = False
	for i in range(c - d, c + d + 1):
		if mi <= i <= ma:
			found = True
			break
	if found:
		print('Yes')
	else:
		print('No')


def func(n, a, b, c, d):
	min_mass = (a - b) * n
	max_mass = (a + b) * n
	if min_mass <= c - d and max_mass >= c + d:
		return 'YES'
	if max_mass >= c - d and max_mass <= c + d or (min_mass >= c - d and min_mass <= c + d):
		return 'YES'
	return 'NO'
data = []
n = int(input())
for _ in range(n):
	data.append(list(map(int, input().split(' '))))
for e in data:
	print(func(*e))


from collections import deque
for _ in range(int(input())):
	a = list(map(int, input().split()))
	c1 = a[0] * (a[1] - a[2])
	c2 = a[0] * (a[1] + a[2])
	d1 = a[3] - a[4]
	d2 = a[3] + a[4]
	if c1 <= d1 and d1 <= c2:
		print('Yes')
		continue
	if c1 <= d2 and d2 <= c2:
		print('Yes')
		continue
	if c2 <= d2 and c1 >= d1:
		print('Yes')
		continue
	print('No')


import math
from collections import Counter

def solve():
	(n, a, b, c, d) = map(int, input().split())
	x1 = c - d
	x2 = c + d
	y1 = a - b
	y2 = a + b
	d = y2 * n
	if d < x1:
		print('No')
		return
	gg = y1 * n
	if gg > x2:
		print('No')
		return
	print('Yes')
for _ in range(int(input())):
	solve()


def main():
	t = int(input())
	for i in range(t):
		(n, a, b, c, d) = list(map(int, input().split()))
		if c + d < (a - b) * n or c - d > (a + b) * n:
			print('No')
		else:
			print('Yes')
main()


t = int(input())
for k in range(t):
	(n, a, b, c, d) = map(int, input().split())
	gma = (a + b) * n
	gmi = (a - b) * n
	tma = c + d
	tmi = c - d
	if gma < tmi or gmi > tma:
		print('No')
	else:
		print('Yes')


for t in range(int(input())):
	(n, a, b, c, d) = map(int, input().split())
	lowera = a - b
	uppera = a + b
	lowerc = c - d
	upperc = c + d
	if uppera * n < lowerc or lowera * n > upperc:
		print('No')
	else:
		print('Yes')


def answer(riceCount, a, b, c, d):
	if a + b == 0 or c + d == 0:
		return 'NO'
	if (a + b) * riceCount < c - d:
		return 'NO'
	if (a - b) * riceCount <= c + d:
		return 'YES'
	return 'NO'
n = int(input())
for _ in range(n):
	(riceCount, a, b, c, d) = map(int, input().split())
	print(answer(riceCount, a, b, c, d))


for i in range(int(input())):
	(n, a, b, c, d) = map(int, input().split())
	if n * (a + b) < c - d or n * (a - b) > c + d:
		print('no')
	else:
		print('yes')


import sys
lines = sys.stdin.readlines()
T = int(lines[0].strip())
for t in range(1, T + 1):
	(n, a, b, c, d) = map(int, lines[t].strip().split(' '))
	mini = (a - b) * n
	maxi = (a + b) * n
	if mini > c + d or maxi < c - d:
		print('No')
	else:
		print('Yes')


for _ in range(int(input())):
	(n, a, b, c, d) = map(int, input().split())
	amb = a - b
	apb = a + b
	cmd = c - d
	cpd = c + d
	print('No' if amb * n > cpd or apb * n < cmd else 'Yes')


t = int(input().strip())
for _ in range(t):
	(n, a, b, c, d) = [int(x) for x in input().strip().split()]
	if n * (a - b) > c + d or n * (a + b) < c - d:
		print('No')
	else:
		print('Yes')


for _ in range(int(input())):
	(n, a, b, c, d) = map(int, input().split())
	k = (a - b) * n
	l = (a + b) * n
	if l >= c - d and k <= c + d:
		print('YES')
	else:
		print('NO')


for _ in range(int(input())):
	(n, a, b, c, d) = map(int, input().split())
	mn = a - b
	mx = a + b
	tmn = c - d
	tmx = c + d
	ans = 0
	if mn * n >= tmn:
		if mn * n <= tmx:
			ans = 1
	elif mx * n >= tmn:
		ans = 1
	if ans:
		print('Yes')
	else:
		print('No')


def nastyarice(n, a, b, c, d):
	w1 = (a - b) * n
	w2 = (a + b) * n
	w3 = c - d
	w4 = c + d
	if w2 < w3 or w4 < w1:
		return 'No'
	else:
		return 'Yes'
test = int(input())
for i in range(test):
	(n, a, b, c, d) = map(int, input().split())
	print(nastyarice(n, a, b, c, d))


for _ in range(int(input())):
	(n, a, b, c, d) = map(int, input().split())
	flag = 0
	for i in range(c - d, c + d + 1):
		j = i / n
		if j >= a - b and j <= a + b:
			flag = 1
			break
	if flag == 0:
		print('No')
	else:
		print('Yes')


for xyz in range(0, int(input())):
	(n, a, b, c, d) = map(int, input().split())
	ll = c - d
	ul = c + d
	lm = (a - b) * n
	mm = (a + b) * n
	if mm < ll:
		print('No')
	elif lm > ul:
		print('No')
	else:
		print('Yes')


T = int(input())
for t in range(T):
	(n, a, b, c, d) = map(int, input().split())
	if (a - b) * n > c + d:
		print('No')
	elif (a + b) * n < c - d:
		print('No')
	else:
		print('Yes')


t = int(input())
l = []
for i in range(t):
	(n, a, b, c, d) = map(int, input().split())
	p = c - d
	q = c + d
	for j in range(p, q + 1):
		l.append(j)
	le = n * (a - b)
	ri = n * (a + b)
	if q < le or ri < p:
		print('no')
	else:
		print('yes')


m = int(input())
while m > 0:
	(n, a, b, c, d) = map(int, input().split())
	mn = (a - b) * n
	mx = (a + b) * n
	if mn > c + d or mx < c - d:
		print('No')
	else:
		print('Yes')
	m -= 1


t = int(input())
for i in range(t):
	(n, a, b, c, d) = map(int, input().split(' '))
	min = n * (a - b)
	max = n * (a + b)
	if min >= c - d and min <= c + d or (max >= c - d and max <= c + d) or (min <= c - d and max >= c + d):
		print('Yes')
	else:
		print('No')


t = int(input())
while t > 0:
	(n, a, b, c, d) = map(int, input().split())
	x = a - b
	y = a + b
	c1 = c - d
	c2 = c + d
	r = 0
	if n * (a + b) < c1 or n * (a - b) > c2:
		print('No')
	else:
		print('Yes')
	t = t - 1


for _ in range(int(input())):
	inp = list(map(int, input().split(' ')))
	if (inp[1] - inp[2]) * inp[0] > inp[3] + inp[4]:
		print('No')
	elif (inp[1] + inp[2]) * inp[0] < inp[3] - inp[4]:
		print('No')
	else:
		print('Yes')


n = int(input())
for i in range(n):
	s = [int(x) for x in input().split()]
	m = s[0]
	a = s[1]
	b = s[2]
	c = s[3]
	d = s[4]
	if m * (a + b) < c - d or m * (a - b) > c + d:
		print('No')
	else:
		print('Yes')


t = int(input())
cases = []
for i in range(t):
	x = input().split()
	cases.append(x)
for i in range(t):
	a = True
	if int(cases[i][0]) * (int(cases[i][1]) - int(cases[i][2])) > int(cases[i][3]) + int(cases[i][4]):
		a = False
	elif int(cases[i][0]) * (int(cases[i][1]) + int(cases[i][2])) < int(cases[i][3]) - int(cases[i][4]):
		a = False
	if a == True:
		print('Yes')
	elif a == False:
		print('No')


ans = []
for _ in range(int(input())):
	(n, a, b, c, d) = map(int, input().split())
	if c - d <= (a - b) * n <= c + d or c - d <= (a + b) * n <= c + d or ((a - b) * n < c - d and (a + b) * n > c + d):
		ans.append('YES')
	else:
		ans.append('NO')
print('\n'.join(ans))


import sys
input = sys.stdin.readline
for i in ' ' * int(input()):
	(n, a, b, c, d) = map(int, input().split())
	mina = a - b
	maxa = a + b
	minc = c - d
	maxc = c + d
	mina *= n
	maxa *= n
	if minc > maxa or mina > maxc:
		print('No')
	else:
		print('Yes')


t = int(input())
for i in range(t):
	(n, a, b, c, d) = [int(x) for x in input().split(' ')]
	grain_upper = a + b
	grain_lower = a - b
	total_upper = c + d
	total_lower = c - d
	result = 'Yes'
	if grain_lower * n > total_upper or grain_upper * n < total_lower:
		result = 'No'
	print(result)


t = int(input())
while t > 0:
	(n, a, b, c, d) = [int(x) for x in input().split()]
	req = []
	flag = 0
	for i in range(c - d, c + d + 1):
		if i >= (a - b) * n and i <= (a + b) * n:
			flag = 1
			break
	if flag == 1:
		print('Yes')
	else:
		print('No')
	t = t - 1


def does_overlap(a, b, c, d):
	if b < c or a > d:
		return False
	return True
for _ in range(int(input())):
	(n, a, b, c, d) = map(int, input().split())
	if does_overlap((a - b) * n, (a + b) * n, c - d, c + d):
		print('Yes')
		continue
	print('No')


import sys
import math

def scan(input_type='int'):
	if input_type == 'int':
		return list(map(int, sys.stdin.readline().strip().split()))
	else:
		return list(map(str, sys.stdin.readline().strip()))

def solution():
	for _ in range(int(input())):
		(n, a, b, c, d) = scan()
		if (a - b) * n > c + d or (a + b) * n < c - d:
			print('No')
		else:
			print('Yes')
solution()


for _ in range(int(input())):
	(n, a, b, c, d) = map(int, input().split())
	miw = (a - b) * n
	maw = (a + b) * n
	mitw = c - d
	matw = c + d
	if miw < mitw and maw < mitw or (miw > matw and maw > matw):
		print('No')
	else:
		print('Yes')


from os import path
from sys import stdin, stdout
if path.exists('input.txt'):
	stdin = open('input.txt', 'r')
	stdout = open('output.txt', 'w')

	def I():
		return int(input())

	def In():
		return map(int, input().split())
else:

	def I():
		return int(stdin.readline())

	def In():
		return map(int, stdin.readline().split())

	def S():
		return stdin.readline().rstrip()

	def Sn():
		return stdin.readline().split(' ')

def func(a, b, c, d, n):
	tot_high = c + d
	tot_low = c - d
	low = (a - b) * n
	high = (a + b) * n
	if low > tot_high or high < tot_low:
		return 'No'
	return 'Yes'

def f(grain_low, grain_high, tot_low, tot_high, n):
	if grain_low > grain_high:
		return 'No'
	mid = (grain_low + grain_high) // 2
	k = mid * n
	if k >= tot_low:
		if k <= tot_high:
			return 'Yes'
		else:
			return f(grain_low, mid - 1, tot_low, tot_high, n)
	else:
		return f(mid + 1, grain_high, tot_low, tot_high, n)
t = I()
st = ''
for _ in range(t):
	(n, a, b, c, d) = In()
	st = '\n'.join((st, func(a, b, c, d, n)))
stdout.write(st.lstrip())


inp = input
li = list
iinp = lambda : int(inp())
ent = lambda : map(int, inp().split())
lient = lambda : [int(i) for i in inp().split()]
li0 = lambda x: [0 for i in range(x)]
stent = lambda : [i for i in inp()]
t = iinp()
for _ in range(t):
	(n, a, b, c, d) = ent()
	li1 = (a - b) * n
	ls1 = (a + b) * n
	li2 = c - d
	ls2 = c + d
	if li1 > ls2 or ls1 < li2:
		print('No')
	else:
		print('Yes')


from sys import stdin
input = stdin.readline
for i in range(int(input())):
	(n, a, b, c, d) = map(int, input().split())
	(r1, l1, r2, l2, k) = (a - b, a + b, c - d, c + d, 0)
	if r1 * n >= r2 and r1 * n <= l2 or (r1 * n < r2 and r2 - r1 * n <= b * 2 * n):
		print('YES')
	else:
		print('NO')


t = int(input())
while t > 0:
	(n, a, b, c, d) = [int(i) for i in input().split()]
	st = a - b
	end = a + b
	lst = c - d
	lend = c + d
	if end * n < lst:
		print('NO')
	elif st * n > lend:
		print('NO')
	else:
		print('YES')
	t -= 1


def f():
	t = int(input())
	while t != 0:
		t = t - 1
		(n, a, b, c, d) = map(int, input().split())
		minsum = c - d
		maxsum = c + d
		gw1 = n * a
		gw2 = n * (a - b)
		gw3 = n * (a + b)
		if gw2 < minsum:
			if gw3 >= minsum:
				print('Yes')
			else:
				print('No')
		elif gw2 > maxsum:
			print('No')
		else:
			print('Yes')

def B():
	t = int(input())
	while t != 0:
		t = t - 1
		(n, k) = map(int, input().split())
		Arr = [int(i) for i in input().split(' ')]
		A = [False] * len(Arr)
		m = 0
		l = 0
		i = 0
		for i in range(1, len(Arr) - 1):
			if Arr[i - 1] < Arr[i] and Arr[i] > Arr[i + 1]:
				A[i] = True
		for i in range(0, k - 1):
			if A[i] == True:
				m = m + 1
		i = 1
		peaks = m
		while i + k <= len(Arr):
			if A[i - 1] == True:
				peaks -= 1
			if A[i + k - 2] == True:
				peaks = peaks + 1
			if peaks > m:
				m = peaks
				l = i
			i = i + 1
		if m == 0:
			print(0, 1)
		else:
			print(m + 1, l + 1)
f()


t = int(input())
for _ in range(t):
	(n, a, b, c, d) = list(map(int, input().split()))
	min_ = n * (a - b)
	max_ = n * (a + b)
	Min = c - d
	Max = c + d
	if min_ >= Min and min_ <= Max:
		print('Yes')
		continue
	if max_ >= Min and max_ <= Max:
		print('Yes')
		continue
	if min_ < Min and max_ <= Max and (max_ >= Min):
		print('Yes')
		continue
	if min_ < Min and max_ > Max:
		print('Yes')
		continue
	if min_ > Max:
		print('No')
		continue
	if max_ < Min:
		print('No')
		continue


t = int(input())
while t:
	(n, a, b, c, d) = map(int, input().split())
	min = n * (a - b)
	max = n * (a + b)
	if max >= c - d and min <= c + d:
		print('YES')
	else:
		print('NO')
	t = t - 1


for q in range(int(input())):
	(n, a, b, c, d) = map(int, input().split())
	(min1, max1, min2, max2) = ((a - b) * n, (a + b) * n, c - d, c + d)
	if max1 < min2 or min1 > max2:
		print('No')
	else:
		print('Yes')


import sys
input = sys.stdin.readline
t = int(input())
for ti in range(1, t + 1):
	(n, a, b, c, d) = map(int, input().split())
	if (a - b) * n <= c + d and (a + b) * n >= c - d:
		print('Yes')
	else:
		print('No')


for _ in range(int(input())):
	(n, a, b, c, d) = map(int, input().split())
	w = a - b
	x = a + b
	y = c - d
	z = c + d
	if w * n <= z and x * n >= y:
		print('Yes')
	else:
		print('No')


t = int(input())
for _ in range(t):
	(n, a, b, c, d) = map(int, input().split())
	p = n * (a - b)
	q = n * (a + b)
	r = c - d
	s = c + d
	if q < r or p > s:
		print('NO')
	else:
		print('YES')


t = int(input())
for asasd in range(t):
	z = [int(x) for x in input().split()]
	n = z[0]
	a = z[1]
	b = z[2]
	c = z[3]
	d = z[4]
	if n * (a + b) <= c + d and n * (a + b) >= c - d:
		print('YES')
		continue
	if n * (a - b) >= c - d and n * (a - b) <= c + d:
		print('YES')
		continue
	if n * (a - b) <= c - d and n * (a + b) >= c + d:
		print('YES')
		continue
	print('NO')


t = int(input())
for _ in range(t):
	(n, a, b, c, d) = map(int, input().split())
	max_b_g = (c + d) / n
	min_b_g = (c - d) / n
	min_g = a - b
	max_g = a + b
	if min_b_g <= max_g <= max_b_g or min_g <= max_b_g <= max_g:
		print('YES')
	else:
		print('NO')


def check_in_range(a, b, c, d):
	if a >= c and a <= d:
		return 'Yes'
	elif b >= c and b <= d:
		return 'Yes'
	else:
		return 'No'
x = int(input())
for i in range(x):
	s = input()
	abcd = list(map(int, s.split()))
	(n, a, b, c, d) = (abcd[0], abcd[1], abcd[2], abcd[3], abcd[4])
	min_wt = (a - b) * n
	max_wt = (a + b) * n
	min_net = c - d
	max_net = c + d
	result = check_in_range(min_wt, max_wt, min_net, max_net)
	if result == 'No':
		result = check_in_range(min_net, max_net, min_wt, max_wt)
	print(result)


t = int(input())
for _ in range(t):
	(n, a, b, c, d) = map(int, input().split())
	x = n * (a - b)
	y = n * (a + b)
	l = c - d
	r = c + d
	if x > r or y < l:
		print('No')
	else:
		print('Yes')


def isConsistent(n, a, b, c, d):
	sum1 = n * (a - b)
	sum2 = n * (a + b)
	if sum1 > c + d or sum2 < c - d:
		return 'No'
	else:
		return 'Yes'
t = int(input())
while t:
	(n, a, b, c, d) = map(int, input().split(' '))
	print(isConsistent(n, a, b, c, d))
	t = t - 1


import math

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

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

def li():
	return list(mi())

def si():
	return input()
for _ in range(ii()):
	(n, a, b, c, d) = mi()
	f = 0
	for i in range(abs(c - d), abs(c + d) + 1):
		if i / n >= abs(a - b) and i / n <= abs(a + b):
			f = 1
			break
		else:
			f = 0
	if f:
		print('YES')
	else:
		print('NO')


def findIntersection(intervals, N):
	l = intervals[0][0]
	r = intervals[0][1]
	for i in range(1, N):
		if intervals[i][0] > r or intervals[i][1] < l:
			return -1
		else:
			l = max(l, intervals[i][0])
			r = min(r, intervals[i][1])
	return 1
x = int(input())
for i in range(x):
	(n, a, b, c, d) = map(int, input().strip().split())
	if findIntersection([[n * (a - b), (a + b) * n], [c - d, c + d]], 2) == 1:
		print('Yes')
	else:
		print('No')


t = int(input())
for i in range(t):
	(n, a, b, c, d) = map(int, input().split())
	min_a = abs(a - b)
	max_a = a + b
	min_c = abs(c - d)
	max_c = c + d
	if n * max_a >= min_c and n * min_a <= max_c:
		print('Yes')
	else:
		print('No')


import sys
reader = (s.rstrip() for s in sys.stdin)
input = reader.__next__

def gift():
	for _ in range(t):
		(n, a, b, c, d) = list(map(int, input().split()))
		minn = n * (a - b)
		maxn = n * (a + b)
		if minn <= c + d and maxn >= c - d:
			yield 'Yes'
		else:
			yield 'No'
t = int(input())
ans = gift()
print(*ans, sep='\n')


a = int(input())
for _ in range(a):
	(n, a, b, c, d) = map(int, input().split())
	min = (a - b) * n
	max = (a + b) * n
	if min <= c - d and max >= c + d:
		print('Yes')
	elif min >= c - d and min <= c + d:
		print('Yes')
	elif max >= c - d and max <= c + d:
		print('Yes')
	else:
		print('No')


import io
import os
input = io.BytesIO(os.read(0, os.fstat(0).st_size)).readline
for _ in range(int(input())):
	(n, a, b, c, d) = map(int, input().split())
	mi = (a - b) * n
	ma = (a + b) * n
	if mi <= c - d and ma >= c + d or (mi >= c - d and mi <= c + d) or (ma >= c - d and ma <= c + d):
		print('Yes')
	else:
		print('No')


t = int(input())
for j in range(t):
	l = list(map(int, input().split()))
	n = l[0]
	a = l[1]
	b = l[2]
	c = l[3]
	d = l[4]
	e = a - b
	f = a + b
	g = c - d
	h = c + d
	if g / n < e and h / n < e:
		print('No')
	elif g / n > f and h / n > f:
		print('No')
	else:
		print('Yes')


def answer(n, a, b, c, d):
	if n * (a + b) >= c - d and n * (a - b) <= c + d:
		return 'Yes'
	else:
		return 'No'

def main():
	t = int(input())
	n = [0] * t
	a = [0] * t
	b = [0] * t
	c = [0] * t
	d = [0] * t
	for j in range(t):
		(n[j], a[j], b[j], c[j], d[j]) = [int(i) for i in input().split()]
	for j in range(t):
		print(answer(n[j], a[j], b[j], c[j], d[j]))
main()


t = int(input())
for x in range(t):
	a = list(map(int, input().split()))
	a1 = a[1]
	b = a[2]
	c = a[3]
	d = a[4]
	n = a[0]
	if n * (a1 + b) < c - d:
		print('No')
	elif n * (a1 - b) > c + d:
		print('No')
	else:
		print('Yes')


for _ in range(int(input())):
	(n, a, b, c, d) = map(int, input().split())
	(rl, ru, pl, pu) = (a - b, a + b, c - d, c + d)
	if n * rl > pu or n * ru < pl:
		print('No')
	else:
		for x in range(n * rl, n * ru + 1):
			if x >= pl or x <= pu:
				print('Yes')
				break
		else:
			print('No')


t = int(input())
for _ in range(t):
	(n, a, b, c, d) = map(int, input().split())
	k = (a - b) * n
	l = (a + b) * n
	if l < c - d:
		print('No')
	elif k > c + d:
		print('No')
	else:
		print('Yes')


from sys import stdin
input = lambda : stdin.readline().strip()
from math import ceil, sqrt, factorial, gcd
for _ in range(int(input())):
	(n, a, b, c, d) = map(int, input().split())
	flag = 'YES'
	mi = a - b
	ma = a + b
	mi1 = c - d
	ma1 = c + d
	if n * ma < mi1 or n * mi > ma1:
		flag = 'NO'
	print(flag)


n = int(input())
for i in range(n):
	s = input().split(' ')
	m = int(s[0])
	a = int(s[1])
	b = int(s[2])
	c = int(s[3])
	d = int(s[4])
	q1 = m * (a - b)
	q2 = m * (a + b)
	if q1 > c + d or q2 < c - d:
		print('NO')
	else:
		print('YES')


def main():
	t = 1
	t = int(input())
	for _ in range(t):
		(n, a, b, c, d) = map(int, input().split())
		if n * (a + b) >= c - d and n * (a - b) <= c + d:
			print('Yes')
		else:
			print('No')
	return
main()


t = int(input())
for _ in range(t):
	(n, a, b, c, d) = list(map(int, input().split()))
	l = [n * (a - b), n * (a + b)]
	r = [c - d, c + d]
	if l[1] < r[0]:
		print('No')
	elif l[0] > r[1]:
		print('No')
	else:
		print('Yes')


def main():
	m = int(input())
	for i in range(m):
		(n, a, b, c, d) = map(int, input().split())
		if c - d <= n * (a - b) <= c + d:
			print('Yes')
		elif n * (a - b) < c - d:
			if n * (a + b) - c + d >= 0:
				print('Yes')
			else:
				print('No')
		elif n * (a + b) > c + d:
			if n * (a - b) <= c + d:
				print('Yes')
			else:
				print('No')
main()


for i in range(int(input())):
	(n, a, b, c, d) = map(int, input().split())
	x1 = n * (a - b)
	x2 = n * (a + b)
	y1 = c - d
	y2 = c + d
	if x2 < y1 or x1 > y2:
		print('No')
	else:
		print('Yes')


t = int(input())
for _ in range(t):
	(n, a, b, c, d) = map(int, input().split())
	lower_limit = (a - b) * n
	upper_limit = (a + b) * n
	total_weight = range(c - d, c + d + 1)
	if lower_limit > c + d or upper_limit < c - d:
		print('No')
	else:
		print('Yes')


for i in range(int(input())):
	(n, a, b, c, d) = map(int, input().split())
	w1 = (a - b) * n
	w2 = (a + b) * n
	if w2 < c - d or w1 > c + d:
		print('NO')
	else:
		print('YES')


T = int(input())
for t in range(T):
	(n, a, b, c, d) = map(int, input().split())
	mn = a - b
	mx = a + b
	flag = 0
	if n * mn > c + d:
		flag = 1
	if n * mx < c - d:
		flag = 1
	if flag == 1:
		print('NO')
	else:
		print('YES')


from sys import stdin
inp = stdin.readline
t = int(inp().strip())
for _ in range(t):
	(n, a, b, c, d) = [int(x) for x in inp().strip().split()]
	w1 = n * (a - b)
	w2 = n * (a + b)
	if w2 < c - d or w1 > c + d:
		print('NO')
	else:
		print('YES')


t = int(input())
while t != 0:
	t -= 1
	(n, a, b, c, d) = map(int, input().split())
	p = n * (a - b)
	q = n * (a + b)
	r = c - d
	s = c + d
	if max(p, r) <= min(q, s):
		print('Yes')
	else:
		print('No')


t = int(input())
for _ in range(t):
	(n, a, b, c, d) = map(int, input().split())
	w_p_min = c - d
	w_p_max = c + d
	w_r_min_sum = n * (a - b)
	w_r_max_sum = n * (a + b)
	if w_r_max_sum >= w_p_min and w_r_min_sum <= w_p_max:
		print('YES')
		continue
	print('NO')


def ntvdm():
	t = int(input())
	for _ in range(t):
		(n, a, b, c, d) = map(int, input().split())
		if n * (a + b) < c - d:
			print('No')
		elif n * (a - b) > c + d:
			print('No')
		else:
			print('Yes')
ntvdm()


for _ in range(int(input())):
	(n, a, b, c, d) = map(int, input().split())
	l1 = c - d
	l2 = c + d
	k1 = (a - b) * n
	k2 = (a + b) * n
	if k1 >= l1 and k1 <= l2:
		print('Yes')
	elif k2 >= l1 and k1 <= l2:
		print('Yes')
	else:
		print('No')


testCase = int(input())
for i in range(testCase):
	flag = 0
	r = 0
	input_string = input()
	(n, a, b, c, d) = [int(x) for x in input_string.split(' ')]
	if n * (a + b) >= c - d and n * (a - b) <= c + d:
		print('Yes')
	else:
		print('No')


t = int(input())
for i in range(0, t):
	(n, a, b, c, d) = [int(x) for x in input().split()]
	min_grain = n * (a - b)
	max_grain = n * (a + b)
	min_sum = c - d
	max_sum = c + d
	if min_grain <= min_sum and max_grain >= max_sum:
		x = 1
	elif min_grain <= min_sum and (max_grain <= max_sum and max_grain >= min_sum):
		x = 1
	elif (min_grain >= min_sum and min_grain <= max_sum) and max_grain >= max_sum:
		x = 1
	elif min_grain >= min_sum and max_grain <= max_sum:
		x = 1
	else:
		x = 0
	if x == 1:
		print('YES')
	else:
		print('NO')


t = int(input())
for i in range(t):
	(n, a, b, c, d) = list(map(int, input().split()))
	l = n * (a - b)
	r = n * (a + b)
	if r < c - d or l > c + d:
		print('NO')
	else:
		print('YES')


for k in range(int(input())):
	(n, a, b, c, d) = map(int, input().split())
	minimo = (a - b) * n
	maximo = (a + b) * n
	upb = c + d
	dwb = c - d
	flag = False
	if minimo < dwb and maximo < dwb:
		print('NO')
	elif minimo > upb and maximo > upb:
		print('NO')
	else:
		print('YES')


t = int(input())
for z in range(t):
	(n, a, b, c, d) = map(int, input().split())
	k1 = (a - b) * n
	k2 = (a + b) * n
	p1 = c - d
	p2 = c + d
	if k1 >= p1 and k1 <= p2 or (k2 >= p1 and k2 <= p2) or (k1 <= p1 and k2 >= p2):
		print('Yes')
	else:
		print('No')


t = int(input())
for _ in range(t):
	(n, a, b, c, d) = map(int, input().split())
	x = a - b
	y = a + b
	m = n * y
	mi = n * x
	if m < c - d:
		print('No')
	elif mi > c + d:
		print('No')
	else:
		print('Yes')


def res(n, a, b, c, d):
	if n * (a + b) < c - d:
		return 'No'
	if n * (a - b) > c + d:
		return 'No'
	return 'Yes'
n = int(input())
for i in range(n):
	lis = list(map(int, input().split()))
	print(res(lis[0], lis[1], lis[2], lis[3], lis[4]))


def solve(n, a, b, c, d):
	flag = (a + b) * n >= c - d and (a - b) * n <= c + d
	return 'YES' if flag else 'NO'

def main():
	inp = lambda : [int(x) for x in input().split()]
	tc = int(input())
	for _ in range(tc):
		(n, a, b, c, d) = inp()
		print(solve(n, a, b, c, d))
main()


t = int(input())
for each_t in range(t):
	(n, a, b, c, d) = input().split()
	(n, a, b, c, d) = (int(n), int(a), int(b), int(c), int(d))
	flag = False
	minimum = n * (a - b)
	maximum = n * (a + b)
	minimum_bag_wt = c - d
	maximum_bag_wt = c + d
	if minimum > maximum_bag_wt or maximum < minimum_bag_wt:
		print('No')
	else:
		print('Yes')


a = int(input())
for i in range(a):
	(n, a, b, c, d) = map(int, input().split())
	w = (a - b) * n
	u = (a + b) * n
	mini = c - d
	maxa = c + d
	if w > maxa or u < mini:
		print('No')
	else:
		print('Yes')


import sys
for _ in range(int(sys.stdin.readline())):
	(n, a, b, c, d) = map(int, sys.stdin.readline().split())
	(a, b) = (a - b, a + b)
	(c, d) = (c - d, c + d)
	f = 0
	s = a * n
	if c <= s <= d:
		f = 1
	else:
		for i in range(a + 1, b + 1):
			if s > c:
				break
			for j in range(1, n + 1):
				s += 1
				if c <= s <= d:
					f = 1
					break
			if f == 1:
				break
	if f:
		print('Yes')
	else:
		print('No')


for t in range(int(input())):
	(n, a, b, c, d) = map(int, input().split())
	n_aDiffb = n * (a - b)
	n_aPlusb = n * (a + b)
	cPlusd = c + d
	cDiffd = c - d
	if n_aPlusb < cDiffd or n_aDiffb > cPlusd:
		print('No')
	else:
		print('Yes')


T = int(input())
for case in range(T):
	(N, A, B, C, D) = map(int, input().split())
	Gmin = A - B
	Gmax = A + B
	Pmin = C - D
	Pmax = C + D
	if Gmin * N > Pmax or Gmax * N < Pmin:
		print('No')
	else:
		print('Yes')


t = int(input())
for i in range(t):
	(n, a, b, c, d) = map(int, input().strip().split(' '))
	f = 0
	a1 = a + b
	a2 = a - b
	c1 = c + d
	c2 = c - d
	a1 = a1 * n
	a2 = a2 * n
	if a1 >= c2 and a1 <= c1:
		f = 1
	if a2 >= c2 and a2 <= c1:
		f = 1
	if c1 >= a2 and c1 <= a1:
		f = 1
	if c2 >= a2 and c2 <= a1:
		f = 1
	if f == 0:
		print('no')
	else:
		print('yes')


def solve():
	(n, a, b, c, d) = map(int, input().split())
	if (a - b) * n <= c + d and (a + b) * n >= c - d:
		print('Yes')
	else:
		print('No')
t = int(input())
for _ in range(t):
	solve()


from sys import stdin, stdout
input = stdin.readline
for _ in range(int(input())):
	ch = 1
	(n, a, b, c, d) = map(int, input().split())
	w1 = a - b
	w2 = c - d
	t1 = a + b
	t2 = c + d
	l1 = n * w1
	r1 = n * t1
	l2 = w2
	r2 = t2
	if l1 < l2 and r1 < l2:
		ch = 0
	if l1 > r2 and r1 > r2:
		ch = 0
	if ch == 1:
		stdout.write('Yes' + '\n')
	else:
		stdout.write('No' + '\n')


from collections import defaultdict
t = int(input())
for i in range(t):
	(n, a, b, c, d) = map(int, input().split())
	flag = False
	for i in range(c - d, c + d + 1):
		if i / n >= a - b and i / n <= a + b:
			flag = True
			break
	if flag:
		print('Yes')
	else:
		print('No')


for testcase in range(int(input())):
	(grains, a, b, c, d) = map(int, input().split())
	minw = grains * (a - b)
	maxw = grains * (a + b)
	minbag = c - d
	maxbag = c + d
	possible = not (maxbag < minw or minbag > maxw)
	print('Yes' if possible else 'No')


t = int(input())
for _ in range(t):
	(n, a, b, c, d) = list(map(int, input().rstrip().split()))
	mi = n * (a - b)
	ma = n * (a + b)
	th1 = c - d
	th2 = c + d
	if ma < th1 or th2 < mi:
		print('NO')
	else:
		print('YES')


t = int(input())
while t:
	t -= 1
	(n, a, b, c, d) = map(int, input().split())
	if n * (a - b) > c + d and n * abs(a - b) > abs(c - d):
		print('NO')
	elif n * (a + b) < c - d and n * (abs(a - b) < abs(c - d)):
		print('NO')
	else:
		print('YES')


OD = 1000000007
ii = lambda : int(input())
si = lambda : input()
dgl = lambda : list(map(int, input()))
f = lambda : map(int, input().split())
il = lambda : list(map(int, input().split()))
ls = lambda : list(input())
from collections import *
for _ in range(ii()):
	(n, a, b, c, d) = f()
	k = [(a - b) * n, (a + b) * n]
	l = 0
	for i in range(c - d, c + d + 1):
		if i >= k[0] and i <= k[1]:
			print('YES')
			l = l + 1
			break
	if l == 0:
		print('NO')


import sys
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 check(n, a, b, c, d):
	l = n * (a - b)
	r = n * (a + b)
	if (l <= c - d <= r or l <= c + d <= r) or (c - d <= l <= c + d or c - d <= r <= c + d):
		return True
	return False

def from_file(f):
	return f.readline
t = inp()
for _ in range(t):
	(n, a, b, c, d) = inlt()
	if check(n, a, b, c, d):
		print('yes')
	else:
		print('no')


y = int(input())
for z in range(y):
	(n, a, b, c, d) = map(int, input().split())
	one_min = a - b
	one_max = a + b
	total_min = c - d
	total_max = c + d
	flag = False
	for number in range(total_min, total_max + 1):
		if one_min * n <= number <= one_max * n:
			flag = True
	if flag:
		print('Yes')
	else:
		print('No')


from bisect import bisect_left as bl
from bisect import bisect_right as br
from heapq import heappush, heappop
import math
from collections import *
from functools import reduce, cmp_to_key
import sys
input = sys.stdin.readline
M = mod = 10 ** 9 + 7

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

def inv_mod(n):
	return pow(n, mod - 2, mod)

def li():
	return [int(i) for i in input().split()]

def st():
	return input()

def val():
	return int(input().rstrip('\n'))

def li2():
	return [i for i in input().rstrip('\n')]

def li3():
	return [int(i) for i in input().rstrip('\n')]
for _ in range(val()):
	(n, a, b, c, d) = li()
	(a, b) = (a - b, a + b)
	(c, d) = (c - d, c + d)
	if n * a > d or n * b < c:
		print('No')
		continue
	l = [a] * n
	s = sum(l)
	for i in l:
		if s < d:
			s += min(d - s, b - i)
	print('Yes' if c <= s <= d else 'No')


t = int(input())
for _ in range(t):
	(n, a, b, c, d) = map(int, input().split())
	q = abs(a - b) * n
	a = abs(a + b) * n
	w = abs(c - d)
	e = abs(c + d)
	if q > e or a < w:
		print('No')
	else:
		print('Yes')


from sys import stdin, stdout

def find(N, a, b, c, d):
	(z1, z2) = ((a - b) * N, (a + b) * N)
	if z2 < c - d or z1 > c + d:
		return 'NO'
	return 'YES'

def main():
	for _ in range(int(stdin.readline())):
		(N, a, b, c, d) = list(map(int, stdin.readline().split()))
		print(find(N, a, b, c, d))
main()


for i in range(int(input())):
	(n, a, b, c, d) = map(int, input().split())
	lower = a - b
	upper = a + b
	l = c - d
	r = c + d
	g = 1
	while l <= r:
		mid = l + (r - l) // 2
		f = mid / n
		if lower <= f and f <= upper:
			g = 0
			print('YES')
			break
		elif f < lower:
			l = mid + 1
		else:
			r = mid - 1
	if g:
		print('NO')


t = int(input())
for _ in range(t):
	cin = input().split()
	abcdi = [int(i) for i in cin]
	(n, a, b, c, d) = abcdi
	if c - d <= (a - b) * n <= c + d or c - d <= (a + b) * n <= c + d or (a - b) * n <= c - d <= c + d <= (a + b) * n:
		print('Yes')
	else:
		print('No')


def hasIntersection(range1, range2):
	(lower1, upper1) = (range1[0], range1[1])
	(lower2, upper2) = (range2[0], range2[1])
	c1 = lower2 <= lower1 <= upper2
	c2 = lower2 <= upper1 <= upper2
	c3 = lower1 <= lower2 <= upper1
	c4 = lower1 <= upper2 <= upper1
	return c1 or c2 or c3 or c4
for t in range(int(input())):
	(n, a, b, c, d) = (int(x) for x in input().split())
	(lower, upper) = ((a - b) * n, (a + b) * n)
	if hasIntersection((lower, upper), (c - d, c + d)):
		print('Yes')
	else:
		print('No')


for _ in range(int(input())):
	(n, a, b, c, d) = map(int, input().split())
	p = (a - b) * n
	q = (a + b) * n
	r = c - d
	s = c + d
	if q < r or p > s:
		print('No')
	else:
		print('Yes')


for i in range(int(input())):
	(n, a, b, c, d) = map(int, input().split())
	chh1 = c - d
	chh2 = c + d
	ans = 'No'
	if chh2 >= (a - b) * n >= chh1:
		ans = 'Yes'
	elif chh2 >= (a + b) * n >= chh1:
		ans = 'Yes'
	elif chh1 >= (a - b) * n and chh2 <= (a + b) * n:
		ans = 'Yes'
	print(ans)


t = int(input())
res = []
for _ in range(t):
	(n, a, b, c, d) = map(int, input().split())
	top = (a + b) * n
	bottom = (a - b) * n
	if top <= c + d and top >= c - d or (bottom <= c + d and bottom >= c - d):
		res.append('YES')
	elif top > c + d and bottom < c - d:
		res.append('YES')
	else:
		res.append('NO')
for r in res:
	print(r)


t = int(input())
for _ in range(t):
	(n, a, b, c, d) = list(map(int, input().split()))
	m = n * (a - b)
	mm = n * (a + b)
	if mm < c - d or m > c + d:
		print('No')
	else:
		print('Yes')


import sys
try:
	sys.stdin = open('input.txt', 'r')
	sys.stdout = open('output.txt', 'w')
except:
	input = sys.stdin.readline

def takeInput():
	return [int(x) for x in input().strip().split()]
t = int(input())
while t != 0:
	t -= 1
	(n, a, b, c, d) = takeInput()
	min_weight = (a - b) * n
	max_weight = (a + b) * n
	found = True
	if max_weight < c - d or min_weight > c + d:
		found = False
	if found:
		print('Yes')
	else:
		print('No')


T = int(input())
for x in range(T):
	Arr = input()
	Arr = Arr.split()
	n = int(Arr[0])
	a = int(Arr[1])
	b = int(Arr[2])
	c = int(Arr[3])
	d = int(Arr[4])
	ip1 = (a - b) * n
	ip2 = (a + b) * n
	op1 = c - d
	op2 = c + d
	if ip2 < op1 or ip1 > op2:
		print('No')
	else:
		print('Yes')


t = int(input())
ans = []
for i in range(t):
	(n, a, b, c, d) = [int(val) for val in input().split(' ')]
	if min(n * (a + b), c + d) - max(n * (a - b), c - d) >= 0:
		ans.append('Yes')
	else:
		ans.append('No')
for i in range(t):
	print(ans[i])


t = int(input())
for test in range(0, t):
	ans = 'Yes'
	l = map(int, input().split())
	[n, a, b, c, d] = l
	max_weight_grains = n * (a + b)
	min_weight_grains = n * (a - b)
	max_total_weight = c + d
	min_total_weight = c - d
	if min_weight_grains > max_total_weight or max_weight_grains < min_total_weight:
		ans = 'No'
	print(ans)


t = int(input())
for i in range(t):
	(n, a, b, c, d) = map(int, input().split())
	p = []
	q = []
	m = []
	flag = 0
	s = 0
	for j in range(c - d, c + d + 1):
		p.append(j)
	for i in range(a - b, a + b + 1):
		q.append(i)
		m.append(i * n)
	if int(m[0]) > int(p[0]) and int(m[0] > p[-1]):
		print('No')
	elif int(m[-1]) < int(p[0]) and int(m[-1]) < int(p[-1]):
		print('No')
	else:
		print('Yes')


t = int(input())
for i in range(t):
	l = list(map(int, input().split()))
	flag = 1
	n = l[0]
	a = l[1]
	b = l[2]
	c = l[3]
	d = l[4]
	x = (a - b) * n
	y = (a + b) * n
	tx = c - d
	ty = c + d
	p = []
	if ty < x:
		print('No')
	else:
		for j in range(tx, ty + 1):
			p.append(j)
		for j in range(x, y + 1):
			if j in p:
				flag = 0
				break
		if flag == 0:
			print('Yes')
		else:
			print('No')


import sys
sys.setrecursionlimit(10 ** 5)
int1 = lambda x: int(x) - 1
p2D = lambda x: print(*x, sep='\n')

def II():
	return int(sys.stdin.readline())

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

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

def LLI(rows_number):
	return [LI() for _ in range(rows_number)]

def SI():
	return sys.stdin.readline()[:-1]

def main():
	for _ in range(II()):
		(n, a, b, c, d) = MI()
		(l, r) = ((a - b) * n, (a + b) * n)
		(ll, rr) = (c - d, c + d)
		if r < ll or rr < l:
			print('No')
		else:
			print('Yes')
main()


t = int(input())
arr = []
for i in range(t):
	arr.append(list(map(int, input().split())))
for i in range(t):
	if (arr[i][1] + arr[i][2]) * arr[i][0] >= arr[i][3] - arr[i][4] and (arr[i][1] - arr[i][2]) * arr[i][0] <= arr[i][3] + arr[i][4]:
		print('YES')
	else:
		print('NO')


a = int(input())
c = []
for i in range(a):
	d = input().split()
	for j in range(len(d)):
		d[j] = int(d[j])
	c.append(d)
for i in range(a):
	if c[i][0] * (c[i][1] - c[i][2]) > c[i][3] + c[i][4] or c[i][0] * (c[i][1] + c[i][2]) < c[i][3] - c[i][4]:
		print('NO')
	else:
		print('YES')


def main():
	(n, a, b, c, d) = map(int, input().split())
	if (a + b) * n < c - d or (a - b) * n > c + d:
		return True
	else:
		return False
t = int(input())
while t:
	flag = main()
	if flag:
		print('No')
	else:
		print('Yes')
	t -= 1


T = int(input())
a = []
for i in range(T):
	s = input()
	k = 0
	l = 0
	S = []
	for j in range(len(s)):
		if s[j] == ' ':
			S.append(int(s[k:j]))
			k = j + 1
			l = l + 1
		if l == 5:
			break
	if l != 5:
		S.append(int(s[k:]))
	j = (S[1] - S[2]) * S[0]
	k = (S[1] + S[2]) * S[0]
	if k < S[3] - S[4] or j > S[3] + S[4]:
		a.append('No')
	else:
		a.append('Yes')
for i in range(T):
	print(a[i])


t = int(input())
for _ in range(t):
	(n, a, b, c, d) = map(int, input().split())
	a1 = (a - b) * n
	a2 = (a + b) * n
	c1 = c - d
	c2 = c + d
	if a1 > c2 or a2 < c1:
		print('No')
	else:
		print('Yes')


for _ in range(int(input())):
	(t, a, b, c, d) = [int(x) for x in input().split()]
	low_grain = a - b
	high_grain = a + b
	low_whole = c - d
	high_whole = c + d
	if t * low_grain <= high_whole and t * high_grain >= low_whole:
		print('Yes')
	else:
		print('No')


from sys import stdin, stdout, setrecursionlimit
input = stdin.readline
print = stdout.write
for _ in range(int(input())):
	ans = 'yes'
	(n, a, b, c, d) = map(int, input().split())
	if (a - b) * n > c + d or (a + b) * n < c - d:
		print('no\n')
	else:
		print('yes\n')


for _ in range(int(input())):
	(n, a, b, c, d) = map(int, input().split())
	l = (a - b) * n
	r = (a + b) * n
	lr = c - d
	rr = c + d
	if l > rr or r < lr:
		print('No')
	else:
		print('Yes')


t = int(input())
for i in range(t):
	l = list(map(int, input().split()))
	a = l[1] - l[2]
	b = l[1] + l[2]
	c = l[3] - l[4]
	d = l[3] + l[4]
	e = a * l[0]
	f = b * l[0]
	if f < c or e > d:
		print('No')
	else:
		print('Yes')


import sys
input = sys.stdin.readline
from collections import *
t = int(input())
for _ in range(t):
	(n, a, b, c, d) = map(int, input().split())
	(e, f) = (a - b, a + b)
	(g, h) = (c - d, c + d)
	if n * f >= g and h >= n * e:
		print('Yes')
	else:
		print('No')


for j in range(int(input())):
	(n, a, b, c, d) = map(int, input().split())
	(l, u) = (c - d, c + d)
	f = 0
	if n * (a + b) < l or n * (a - b) > u:
		print('No')
	else:
		print('Yes')


t = int(input())
for u in range(t):
	(n, a, b, c, d) = list(map(int, input().split()))
	mi = n * (a - b)
	ma = n * (a + b)
	deff = 0
	if mi <= c - d and ma >= c - d:
		deff = 1
	if ma >= c + d and mi <= c + d:
		deff = 1
	if ma <= c + d and mi >= c - d:
		deff = 1
	if deff == 0:
		print('No')
	else:
		print('Yes')


t = int(input())
for i in range(t):
	(n, a, b, c, d) = map(int, input().split())
	absum = a + b
	abdif = a - b
	cdsum = c + d
	cddif = c - d
	if n * absum >= cddif and n * abdif <= cdsum:
		print('YES')
	else:
		print('NO')


t = int(input())
for _ in range(t):
	(n, a, b, c, d) = map(int, input().split())
	it1 = ((a - b) * n, (a + b) * n)
	it2 = (c - d, c + d)
	if it1[0] <= it2[1] and it1[1] >= it2[0]:
		print('YES')
	else:
		print('NO')


import random, math
from copy import deepcopy as dc
from bisect import bisect_left, bisect_right

def solution(n, a, b, c, d):
	mi = a - b
	ma = a + b
	mi1 = c - d
	mi2 = c + d
	for i in range(mi1, mi2 + 1):
		if mi * n <= i <= ma * n or mi * n <= i <= ma * n:
			return True
	return False

def input_test():
	for _ in range(int(input())):
		(n, a, b, c, d) = map(int, input().strip().split(' '))
		out = solution(n, a, b, c, d)
		print('YES' if out else 'NO')

def test():
	pass
input_test()


numTest = int(input())

def test():
	(n, a, b, c, d) = list(map(int, input().split(' ')))
	if c - d <= (a - b) * n and c + d >= (a - b) * n:
		return True
	elif c - d <= (a + b) * n and c + d >= (a - b) * n:
		return True
	return False
for _ in range(0, numTest):
	print('Yes' if test() else 'No')


for _ in range(int(input())):
	(num_grains, a, b, c, d) = map(int, input().split())
	sum = 0
	mass_grains_up = (a + b) * num_grains
	mass_grains_low = (a - b) * num_grains
	total_up = c + d
	total_low = c - d
	che = max(0, min(total_up, mass_grains_up) - max(total_low, mass_grains_low) + 1)
	if che != 0:
		print('Yes')
	else:
		print('No')


def rn():
	a = int(input())
	return a

def rl():
	a = list(map(int, input().split()))
	return a
for _ in range(int(input())):
	[n, a, b, c, d] = rl()
	minn = n * (a - b)
	maxx = n * (a + b)
	ans = 'No'
	if minn <= c + d and maxx >= c - d:
		ans = 'Yes'
	print(ans)


for _ in range(int(input())):
	(n, a, b, c, d) = map(int, input().split())
	(x1, y1) = (a - b, a + b)
	(x2, y2) = (c - d, c + d)
	if y1 * n < x2 and x1 * n < x2 or (y2 < x1 * n and y2 < y1 * n):
		print('NO')
	else:
		print('YES')


numTests = int(input())
for eachTest in range(numTests):
	(n, a, b, c, d) = tuple((int(i) for i in input().split(' ')))
	minGWeight = a - b
	maxGWeight = a + b
	minBWeight = c - d
	maxBWeight = c + d
	if n * minGWeight > maxBWeight:
		print('No')
	elif n * maxGWeight < minBWeight:
		print('No')
	else:
		print('Yes')


for test in range(int(input())):
	(n, a, b, c, d) = map(int, input().split())
	if c - d <= n * (a + b) and n * (a - b) <= c + d:
		print('Yes')
	else:
		print('No')


n = int(input())
for i in range(n):
	(n, a, b, c, d) = [int(z) for z in input().split()]
	option_1 = abs(d - c) / abs(a - b)
	option_2 = abs(d - c) / (a + b)
	option_3 = (d + c) / abs(a - b)
	option_4 = (d + c) / (a + b)
	maxVal = max(option_1, option_2, option_3, option_4)
	minimumVal = min(option_1, option_2, option_3, option_4)
	if n >= minimumVal and n <= maxVal:
		print('Yes')
	else:
		print('No')


t = int(input())
for i in range(t):
	num = list(map(int, input().split()))
	n = num[0]
	a = num[1]
	b = num[2]
	c = num[3]
	d = num[4]
	if (a - b) * n > c + d or (a + b) * n < c - d:
		print('No')
	else:
		print('Yes')


t = int(input())
for i in range(t):
	a = input().split(' ')
	s1 = int(a[1]) - int(a[2])
	e1 = int(a[1]) + int(a[2])
	s2 = int(a[3]) - int(a[4])
	e2 = int(a[3]) + int(a[4])
	if s2 > e1 * int(a[0]) or e2 < s1 * int(a[0]):
		print('NO')
	else:
		print('YES')


import sys
import math

def read_line():
	return sys.stdin.readline()[:-1]

def read_int():
	return int(sys.stdin.readline())

def read_int_line():
	return [int(v) for v in sys.stdin.readline().split()]

def is_overlapping(x1, x2, y1, y2):
	return max(x1, y1) <= min(x2, y2)
t = read_int()
for i in range(t):
	(n, a, b, c, d) = read_int_line()
	y = n * (a + b)
	x = n * (a - b)
	r = c + d
	l = c - d
	if is_overlapping(x, y, l, r):
		print('Yes')
	else:
		print('No')


t = int(input())
for _ in range(t):
	(n, a, b, c, d) = list(map(int, input().split()))
	mi = n * (a - b)
	ma = n * (a + b)
	if mi <= c + d and ma >= c - d:
		print('YES')
	else:
		print('NO')


for _ in range(int(input())):
	(n, a, b, c, d) = map(int, input().split())
	l = (a - b) * n
	r = (a + b) * n
	wl = c - d
	wr = c + d
	if l > wr or r < wl:
		print('No')
	else:
		print('Yes')


t = int(input())
for _ in range(t):
	(n, a, b, c, d) = map(int, input().split())
	corn_down = a - b
	corn_up = a + b
	pack_down = c - d
	pack_up = c + d
	corn_down_limit = n * corn_down
	corn_up_limit = n * corn_up
	if corn_up_limit < pack_down or corn_down_limit > pack_up:
		print('no')
	else:
		print('yes')


from sys import stdin, stdout
from math import *
for __ in range(int(input())):
	(n, a, b, c, d) = map(int, input().split())
	x1 = a - b
	x2 = a + b
	if x2 * n < c - d:
		print('No')
	elif x1 * n > c + d:
		print('No')
	else:
		print('Yes')


import sys
import math

def main():
	input = sys.stdin.readline
	t = int(input())
	while t > 0:
		t -= 1
		(n, a, b, c, d) = (int(i) for i in input().split())
		i1s = n * (a - b)
		i1e = n * (a + b)
		i2s = c - d
		i2e = c + d
		if i1e < i2s:
			print('No')
		elif i2e < i1s:
			print('No')
		else:
			print('Yes')
main()


t = int(input())
for _ in range(t):
	(n, a, b, c, d) = map(int, input().split(' '))
	low_g = a - b
	high_g = a + b
	low_p = c - d
	high_p = c + d
	if n * high_g >= low_p and (n * high_g <= high_p or n * low_g <= high_p):
		print('YES')
	else:
		print('NO')


T = int(input())
for _ in range(0, T):
	(n, a, b, c, d) = map(int, input().split())
	mn = (a - b) * n
	mx = (b + a) * n
	tt1 = c - d
	tt2 = c + d
	if mx < tt1 or mn > tt2:
		print('No')
	else:
		print('Yes')


for _ in range(int(input())):
	(n, a, b, c, d) = map(int, input().split())
	mi = a - b
	ma = a + b
	ts = c - d
	te = c + d
	if mi * n > te or ma * n < ts:
		print('No')
	else:
		print('Yes')


t = int(input())
for i in range(t):
	(n, a, b, c, d) = list(map(int, input().split()))
	x = n * (a - b)
	y = n * (a + b)
	print('No') if x > c + d or y < c - d else print('Yes')
	t -= 1


import sys

def noop(*object):
	return

def main():
	T = read_int()
	for case_idx in range(T):
		ans = solve_case()
		sys.stdout.write('{}\n'.format(ans))

def solve_case():
	(n, a, b, c, d) = read_int_list()
	if (a - b) * n > c + d or (a + b) * n < c - d:
		return 'No'
	return 'Yes'

def read_str():
	return input()

def read_int():
	return int(input())

def read_str_list():
	return input().split(' ')

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

def read_lines(n, read_func):
	return [read_func() for _ in range(n)]

def list_to_str(l, sep=' '):
	return sep.join(map(str, l))
l2s = list_to_str

def make_list(shape, value=None):
	if len(shape) == 1:
		return [value] * shape[0]
	return [make_list(shape[1:], value) for _ in range(shape[0])]
sys.setrecursionlimit(1000000)
main()


import sys
t = int(sys.stdin.readline())
for _ in range(t):
	(n, a, b, c, d) = map(int, sys.stdin.readline().split())
	mini = n * (a - b)
	maxi = n * (a + b)
	if mini < c - d:
		if maxi >= c - d:
			print('Yes')
		else:
			print('No')
	elif mini >= c - d and mini <= c + d:
		print('Yes')
	else:
		print('No')


t = int(input())
for _ in range(t):
	(n, a, b, c, d) = (int(x) for x in input().split())
	if abs(n * a - c) - (n * b + d) <= 0:
		print('YES')
	else:
		print('No')


test = int(input())
while test:
	s = input().split(' ')
	s1 = []
	for i in s:
		s1.append(int(i))
	n = s1[0]
	a = s1[1]
	b = s1[2]
	c = s1[3]
	d = s1[4]
	if a + b >= (c - d) / n and a - b <= (c + d) / n:
		print('Yes')
	else:
		print('No')
	test -= 1


import sys
from itertools import accumulate

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

def list2d(a, b, c):
	return [[c] * b for i in range(a)]

def list3d(a, b, c, d):
	return [[[d] * c for j in range(b)] for i in range(a)]

def list4d(a, b, c, d, e):
	return [[[[e] * d for j in range(c)] for j in range(b)] for i in range(a)]

def ceil(x, y=1):
	return int(-(-x // y))

def INT():
	return int(input())

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

def LIST(N=None):
	return list(MAP()) if N is None else [INT() for i in range(N)]

def Yes():
	print('Yes')

def No():
	print('No')

def YES():
	print('YES')

def NO():
	print('NO')
INF = 10 ** 18
MOD = 10 ** 9 + 7
for _ in range(INT()):
	(N, a, b, c, d) = MAP()
	mn = (a - b) * N
	mx = (a + b) * N
	mntotal = c - d
	mxtotal = c + d
	if mxtotal < mn or mx < mntotal:
		No()
	else:
		Yes()


t = int(input())

def solve(n, a, b, c, d):
	for i in range(c - d, c + d + 1):
		if n * (a - b) <= i <= n * (a + b):
			return True
	return False
for _ in range(t):
	(n, a, b, c, d) = map(int, input().split())
	if solve(n, a, b, c, d):
		print('Yes')
	else:
		print('No')


from sys import stdin
r = stdin.readline

def main():
	global r
	cases = int(r())
	for case in range(cases):
		(n, a, b, c, d) = map(int, r().strip().split())
		print('No' if (a + b) * n < c - d or (a - b) * n > c + d else 'Yes')
main()


t = int(input())
for T in range(t):
	(n, a, b, c, d) = map(int, input().split(' '))
	lo = (a - b) * n
	hi = (a + b) * n
	if lo > c + d or hi < c - d:
		print('No')
	else:
		print('Yes')


import sys
input = sys.stdin.readline
t = int(input())
for i in range(t):
	(n, a, b, c, d) = map(int, input().split())
	if (a + b) * n < c - d:
		print('No')
	elif (a - b) * n > c + d:
		print('No')
	else:
		print('Yes')


def main():
	t = int(input())
	for o in range(t):
		(n, a, b, c, d) = map(int, input().split())
		if (a - b) * n > c + d:
			print('No')
			continue
		elif (a + b) * n < c - d:
			print('No')
			continue
		else:
			print('Yes')
main()


t = int(input())
for xx in range(t):
	(n, a, b, c, d) = map(int, input().split())
	minw = (a - b) * n
	maxw = (a + b) * n
	if minw > c + d or maxw < c - d:
		print('No')
	else:
		print('Yes')


t = int(input())
for i in range(t):
	l = list(map(int, input().split(' ')))
	n = l[0]
	if n * (l[1] - l[2]) > l[3] + l[4] or n * (l[1] + l[2]) < l[3] - l[4]:
		print('No')
	else:
		print('Yes')


t = int(input())
for i in range(t):
	(n, a, b, c, d) = map(int, input().split())
	(r1, r2) = (a - b, a + b)
	(p1, p2) = (c - d, c + d)
	ans = 'No'
	x = n * r1
	y = n * r2
	for i in range(p1, p2 + 1):
		if i >= x and i <= y:
			ans = 'Yes'
			break
	print(ans)


class inp:

	@staticmethod
	def int():
		return int(input())

	@staticmethod
	def imap():
		return map(int, input().split())

def main():
	t = inp.int()
	for _ in range(t):
		(n, a, b, c, d) = inp.imap()
		mig = (a - b) * n
		mag = (a + b) * n
		minp = c - d
		maxp = c + d
		if mag >= minp and mig <= maxp:
			print('Yes')
		else:
			print('No')
main()


s = int(input())
t = []
for e in range(s):
	(k, a, b, c, d) = [int(j) for j in input().split()]
	if c - d > (a + b) * k or c + d < (a - b) * k:
		u = 'no'
	else:
		u = 'yes'
	t.append(u)
for i in t:
	print(i)


for _ in range(int(input())):
	(n, a, b, c, d) = map(int, input().split())
	m = n * (a + b)
	mi = n * (a - b)
	t_m = c + d
	t_mi = c - d
	if m >= t_m and mi <= t_m and (mi >= t_mi):
		print('Yes')
	elif m >= t_mi and t_m >= m:
		print('Yes')
	elif m >= t_m and t_mi >= mi:
		print('Yes')
	elif t_m > m and t_mi <= mi:
		print('Yes')
	else:
		print('No')


import sys
import math
import itertools
import functools
import collections
import operator
import fileinput
import copy
ORDA = 97

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

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

def li():
	return [int(i) for i in input().split()]

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

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

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

def ddl():
	return collections.defaultdict(list)

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)
for _ in range(ii()):
	(n, a, b, c, d) = mi()
	if c + d < n * (a - b) or n * (a + b) < c - d:
		print('No')
	else:
		print('Yes')


from math import ceil
test_case = int(input())
my_list = []
for i in range(test_case):
	my_list.append([int(j) for j in input().split()])
for x in range(test_case):
	if (my_list[x][3] - my_list[x][4]) / my_list[x][0] > my_list[x][1] + my_list[x][2] or (my_list[x][3] + my_list[x][4]) / my_list[x][0] < my_list[x][1] - my_list[x][2]:
		print('No')
	else:
		print('Yes')


def sol():
	(n, a, b, c, d) = map(int, input().split())
	maxa = (a + b) * n
	mina = (a - b) * n
	maxb = c + d
	minb = c - d
	if n * abs(a - b) == abs(c - d) or n * abs(a + b) == abs(c - d) or n * abs(a - b) == abs(c + d) or (n * abs(a + b) == abs(c + d)):
		return 'Yes'
	elif mina > maxb or maxa < minb:
		return 'No'
	else:
		return 'Yes'
for _ in range(int(input())):
	print(sol())


def intersection_length(a0, a1, b0, b1):
	if a0 >= b0 and a1 <= b1:
		intersection = 1
	elif a0 <= b0 and a1 >= b1:
		intersection = 1
	elif a0 <= b0 <= a1:
		intersection = 1
	elif a0 <= b1 <= a1:
		intersection = 1
	else:
		intersection = 0
	return intersection
t = int(input())
for _ in range(t):
	(n, a, b, c, d) = map(int, input().split())
	if intersection_length(n * (a - b), n * (a + b), c - d, c + d) == 0:
		print('No')
	else:
		print('Yes')


def grain(n, a, b, c, d):
	x = a + b
	y = a - b
	s = c + d
	t = c - d
	if t <= x * n and y * n <= s:
		print('YES')
	else:
		print('NO')
t = int(input())
for i in range(t):
	(n, a, b, c, d) = [int(i) for i in input().split()]
	ans = grain(n, a, b, c, d)
	ans


t = int(input())
for i in range(t):
	f = input().split()
	(n, a, b, c, d) = (int(f[0]), int(f[1]), int(f[2]), int(f[3]), int(f[4]))
	if n * (a - b) > c + d:
		print('No')
		continue
	if n * (a + b) < c - d:
		print('No')
		continue
	else:
		print('Yes')


t = int(input())
for _ in range(t):
	(n, a, b, c, d) = map(int, input().split())
	low = (a - b) * n
	high = (a + b) * n
	lim_low = c - d
	lim_high = c + d
	if high < lim_low:
		print('NO')
		continue
	if lim_high < low:
		print('NO')
		continue
	print('YES')


T = int(input())
from random import randint
for t in range(1, T + 1):
	(n, a, b, c, d) = map(int, input().split())
	min_range = a - b
	max_range = a + b
	min_total = c - d
	max_total = c + d
	case_1 = n * min_range / min_total
	case_2 = n * min_range / max_total
	case_3 = n * max_range / min_total
	case_4 = n * max_range / max_total
	if case_1 < 1 and case_2 < 1 and (case_3 < 1) and (case_4 < 1) or (case_1 > 1 and case_2 > 1 and (case_3 > 1) and (case_4 > 1)):
		print('NO')
	else:
		print('YES')


t = int(input())
for _ in range(t):
	(n, a, b, c, d) = map(int, input().split())
	A = n * (a - b)
	B = n * (a + b)
	if A >= c - d and B <= c + d:
		print('Yes')
	elif c - d <= A <= c + d <= B:
		print('Yes')
	elif c + d >= B >= c - d >= A:
		print('Yes')
	elif A <= c - d and c + d <= B:
		print('Yes')
	else:
		print('No')


t = int(input())
for x in range(t):
	(n, a, b, c, d) = map(int, input().split())
	maxGrainWeight = a + b
	minGrainWeight = a - b
	maxBagWeight = c + d
	minBagWeight = c - d
	if maxGrainWeight * n >= minBagWeight and minGrainWeight * n <= maxBagWeight:
		print('Yes')
	else:
		print('No')


for s in [*open(0)][1:]:
	(n, a, b, c, d) = map(int, s.split())
	print('YNeos'[c + d < n * (a - b) or (a + b) * n < c - d::2])


t = int(input())
for _ in range(0, t):
	val = list(map(int, input().split()))
	R = val[0] * (val[1] + val[2])
	L = val[0] * (val[1] - val[2])
	if R < val[3] - val[4] or L > val[3] + val[4]:
		print('No\n')
	else:
		print('Yes\n')


t = int(input())
for _ in range(t):
	(n, a, b, c, d) = map(int, input().split())
	mn = (a - b) * n
	mx = (a + b) * n
	mic = c - d
	max = c + d
	if mic > mx or max < mn:
		print('No')
	else:
		print('Yes')


import math
import atexit
import io
import sys
_OUTPUT_BUFFER = io.StringIO()
sys.stdout = _OUTPUT_BUFFER

@atexit.register
def write():
	sys.__stdout__.write(_OUTPUT_BUFFER.getvalue())

def array_to_string(a):
	s = ''
	for i in a:
		s += str(i)
	return s
t = int(input())
while t > 0:
	t = t - 1
	(n, a, b, c, d) = map(int, input().split())
	m_wt = c - d
	ma_wt = c + d
	if (a + b) * n < c - d or (a - b) * n > c + d:
		print('No')
	else:
		print('Yes')


import sys
input = sys.stdin.readline
from math import log2, log, ceil

def swaparr(arr, a, b):
	temp = arr[a]
	arr[a] = arr[b]
	arr[b] = temp

def gcd(a, b):
	if a == 0:
		return b
	return gcd(b % a, a)

def nCr(n, k):
	if k > n - k:
		k = n - k
	res = 1
	for i in range(k):
		res = res * (n - i)
		res = res / (i + 1)
	return res

def upper_bound(a, x, lo=0):
	hi = len(a)
	while lo < hi:
		mid = (lo + hi) // 2
		if a[mid] < x:
			lo = mid + 1
		else:
			hi = mid
	return lo

def primefs(n):
	primes = {}
	while n % 2 == 0:
		primes[2] = primes.get(2, 0) + 1
		n = n // 2
	for i in range(3, int(n ** 0.5) + 2, 2):
		while n % i == 0:
			primes[i] = primes.get(i, 0) + 1
			n = n // i
	if n > 2:
		primes[n] = primes.get(n, 0) + 1
	return primes

def power(x, y, p):
	res = 1
	x = x % p
	if x == 0:
		return 0
	while y > 0:
		if y & 1 == 1:
			res = res * x % p
		y = y >> 1
		x = x * x % p
	return res

def swap(a, b):
	temp = a
	a = b
	b = temp
	return (a, b)

def find(x, link):
	while x != link[x]:
		x = link[x]
	return x

def union(x, y, size, link):
	x = find(x, link)
	y = find(y, link)
	if size[x] < size[y]:
		(x, y) = swap(x, y)
	if x != y:
		size[x] += size[y]
		link[y] = x

def sieve(n):
	prime = [True for i in range(n + 1)]
	p = 2
	while p * p <= n:
		if prime[p] == True:
			for i in range(p * p, n + 1, p):
				prime[i] = False
		p += 1
	return prime
MAXN = int(1000000.0 + 5)

def spf_sieve():
	spf[1] = 1
	for i in range(2, MAXN):
		spf[i] = i
	for i in range(4, MAXN, 2):
		spf[i] = 2
	for i in range(3, ceil(MAXN ** 0.5), 2):
		if spf[i] == i:
			for j in range(i * i, MAXN, i):
				if spf[j] == j:
					spf[j] = i

def factoriazation(x):
	ret = {}
	while x != 1:
		ret[spf[x]] = ret.get(spf[x], 0) + 1
		x = x // spf[x]
	return ret

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

def str_array():
	return input().strip().split()
MOD = int(1000000000.0) + 7
CMOD = 998244353
INF = float('inf')
NINF = -float('inf')
for _ in range(int(input())):
	(n, a, b, c, d) = int_array()
	f = 0
	for i in range(c - d, c + d + 1):
		if i / n >= a - b and i / n <= a + b:
			f = 1
			break
	if f:
		print('Yes')
	else:
		print('No')


t = int(input())
for test in range(t):
	(n, a, b, c, d) = [int(x) for x in input().split()]
	left = a - b
	right = a + b
	tl = c - d
	tu = c + d
	flag = 0
	if right * n < tl or left * n > tu:
		print('No')
	else:
		print('Yes')


for _ in range(int(input())):
	(n, a, b, c, d) = map(int, input().split())
	gmin = a - b
	gmax = a + b
	smin = c - d
	smax = c + d
	if n * gmax >= smax and n * gmin <= smax:
		print('YES')
	elif n * gmax >= smin and n * gmin <= smin:
		print('YES')
	elif n * gmax <= smax and n * gmin >= smin:
		print('Yes')
	else:
		print('NO')


p = int(input())
re = list()
for i in range(p):
	n = list(map(int, input().split()))
	if (n[1] + n[2]) * n[0] == n[3] + n[4] or (n[1] - n[2]) * n[0] == n[3] + n[4]:
		re.append('Yes')
	elif (n[1] + n[2]) * n[0] == n[3] - n[4] or (n[1] - n[2]) * n[0] == n[3] - n[4]:
		re.append('Yes')
	elif (n[1] + n[2]) * n[0] < abs(n[3] - n[4]):
		re.append('No')
	elif abs(n[1] - n[2]) * n[0] > n[3] + n[4]:
		re.append('No')
	else:
		re.append('Yes')
for i in re:
	print(i)


def solve():
	(n, a, b, c, d) = map(int, input().split())
	(diff1, diff2) = (n * (a - b), n * (a + b))
	(diff3, diff4) = (c - d, c + d)
	if diff1 >= diff3 and diff1 <= diff4 or (diff2 >= diff3 and diff2 <= diff4) or (diff3 >= diff1 and diff4 <= diff2) or (diff3 >= diff1 and diff4 <= diff2):
		print('Yes')
	else:
		print('No')
try:
	for _ in range(int(input())):
		solve()
except:
	pass


for _ in range(int(input())):
	(n, a, b, c, d) = map(int, input().split())
	mini = a - b
	maxi = a + b
	res = 0
	if mini * n > c + d:
		print('NO')
	elif maxi * n < c - d:
		print('NO')
	else:
		print('YES')


t = int(input())
ans = []
while t:
	(n, a, b, c, d) = map(int, input().split())
	if int(n * (a - b)) <= c + d and int(n * (a + b)) >= c - d:
		ans.append('Yes')
	else:
		ans.append('No')
	t -= 1
for i in range(len(ans)):
	print(ans[i])


from collections import defaultdict, Counter
import copy, math
from copy import deepcopy
for _ in range(int(input())):
	(n, a, b, c, d) = map(int, input().split())
	if (c + d) / (a - b) >= n and (c - d) / (a + b) <= n:
		print('Yes')
	else:
		print('No')


import math
for i in range(int(input())):
	(n, a, b, c, d) = tuple(map(int, input().split()))
	if n * (a - b) <= c + d and n * (a + b) >= c - d:
		print('Yes')
	else:
		print('No')


T = int(input())
for _ in range(T):
	(n, a, b, c, d) = map(int, input().split())
	mio = c - d
	mao = c + d
	mi = (a - b) * n
	ma = (a + b) * n
	if mi >= mio and mi <= mao:
		print('YES')
		continue
	elif ma >= mio and ma <= mao:
		print('YES')
		continue
	elif mio >= mi and mio <= ma:
		print('YES')
		continue
	elif mao >= mi and mao <= ma:
		print('YES')
		continue
	else:
		print('NO')


import sys
input = sys.stdin.readline
Q = int(input())
Query = [list(map(int, input().split())) for _ in range(Q)]
for (N, A, B, C, D) in Query:
	ok = (A + B) * N >= C - D and (A - B) * N <= C + D
	print('Yes' if ok else 'No')


t = int(input())
for i in range(t):
	(n, a, b, c, d) = [int(i) for i in input().split()]
	min_each = a - b
	max_each = a + b
	min_whole = c - d
	max_whole = c + d
	if min_each < 0 and min_whole < 0:
		print('NO')
	elif min_whole <= min_each * n <= max_whole or min_whole <= max_each * n <= max_whole or (min_each * n < min_whole and max_each * n > max_whole):
		print('YES')
	else:
		print('NO')


t = int(input())
for i in range(t):
	(n, a, b, c, d) = map(int, input().split())
	e = c + d
	f = c - d
	g = n * (a - b)
	h = n * (a + b)
	if g < f and h < f:
		print('No')
	elif g > e and h > f:
		print('No')
	else:
		print('Yes')


for _ in range(int(input())):
	(n, a, b, c, d) = map(int, input().split())
	x = a - b
	y = a + b
	i = c - d
	j = c + d
	r = max(x * n, i)
	s = min(y * n, j)
	if r <= s:
		print('Yes')
	else:
		print('No')


for _ in range(int(input())):
	data = list(map(int, input().split()))
	n = data[0]
	a = data[1]
	b = data[2]
	c = data[3]
	d = data[4]
	left = (a - b) * n
	right = (a + b) * n
	check = False
	if left <= c + d and right >= c - d:
		check = True
	if check:
		print('Yes')
	else:
		print('No')


def ok(a, b, c):
	if a >= b and a <= c:
		return 1
	return 0
t = int(input(''))
for _ in range(t):
	[n, a, b, c, d] = list(map(int, input().split()))
	x = c - d
	y = c + d
	flag = 0
	if (a - b) * n > y or (a + b) * n < x:
		print('No')
		continue
	print('Yes')


INT_MAX = 10 ** 19 + 7
MOD = 10 ** 12 + 7

def INPUT():
	return list((int(i) for i in input().split()))

def LIST_1D_ARRAY(n):
	return [0 for _ in range(n)]

def LIST_2D_ARRAY(m, n):
	return [[0 for _ in range(n)] for _ in range(m)]
for _ in range(int(input())):
	(n, a, b, c, d) = INPUT()
	g1 = n * (a - b)
	g2 = n * (a + b)
	w1 = c - d
	w2 = c + d
	if w2 < g1 or w1 > g2:
		print('NO')
	else:
		print('YES')


t = int(input())
for q in range(t):
	(n, a, b, c, d) = map(int, input().split())
	ricemin = (a - b) * n
	ricemax = (a + b) * n
	packmin = c - d
	packmax = c + d
	if ricemin > packmax or ricemax < packmin:
		print('NO')
	else:
		print('YES')


for _ in range(int(input())):
	(n, a, b, c, d) = map(int, input().split())
	gl = abs(a - b)
	gr = abs(a + b)
	bl = abs(c - d)
	br = abs(c + d)
	leastbw = n * gl
	mostbw = gr * n
	p = False
	if leastbw <= bl:
		if mostbw >= bl:
			p = True
	elif leastbw <= br:
		p = True
	if p:
		print('Yes')
	else:
		print('No')


for t in range(int(input())):
	(n, a, b, c, d) = map(int, input().split())
	x = n * (a + b)
	y = n * (a - b)
	w = c + d
	z = c - d
	if x >= z and y <= w:
		print('YES')
	else:
		print('NO')


import os

def run_util(n, a, b, c, d):
	i_max = (a + b) * n
	i_min = (a - b) * n
	tot_max = c + d
	tot_min = c - d
	if tot_min > i_max:
		return 'No'
	elif tot_max < i_min:
		return 'No'
	return 'Yes'

def main():
	iteration = int(input())
	for i in range(0, iteration):
		(n, a, b, c, d) = map(int, input().split())
		print(run_util(n, a, b, c, d))
main()


t = int(input())
while t > 0:
	t = t - 1
	(n, a, b, c, d) = input().split()
	x = int(c) - int(d)
	u = 0
	while x <= int(c) + int(d):
		if int(a) - int(b) <= x / float(n) <= int(a) + int(b):
			u = 1
		x = x + 1
	if u:
		print('Yes')
	else:
		print('No')


from sys import stdin, stdout
from collections import defaultdict
input = stdin.buffer.readline
t = int(input())
for _ in range(t):
	(n, a, b, c, d) = list(map(int, input().split()))
	lf = n * (a - b)
	rt = n * (a + b)
	if (c - d <= lf and c + d >= lf or (c - d <= rt and c + d >= rt)) or (lf < c - d and rt > c + d):
		print('Yes')
	else:
		print('No')


import sys
input = sys.stdin.readline
t = int(input())
for _ in range(t):
	(n, a, b, c, d) = map(int, input().split())
	(gl, gr) = (n * (a - b), n * (a + b))
	(tl, tr) = (c - d, c + d)
	if gr < tl or gl > tr:
		print('No')
	else:
		print('Yes')


def solve(n, a, b, c, d):
	min_sum = (a - b) * n
	max_sum = (a + b) * n
	return min_sum <= c + d and max_sum >= c - d
for i in range(int(input())):
	(n, a, b, c, d) = map(int, input().split())
	print('Yes' if solve(n, a, b, c, d) else 'No')


from math import *
from collections import *
from operator import itemgetter
import bisect
ii = lambda : int(input())
iia = lambda : list(map(int, input().split()))
isa = lambda : list(input().split())
I = lambda : list(map(int, input().split()))
chrIdx = lambda x: ord(x) - 96
idxChr = lambda x: chr(96 + x)
t = ii()
for _ in range(t):
	(n, a, b, c, d) = iia()
	flag = 1
	if n * (a - b) > c + d or n * (a + b) < c - d:
		flag = 0
	if flag == 0:
		print('No')
	else:
		print('Yes')


import io, sys, atexit, os
import math as ma
from sys import exit
from decimal import Decimal as dec
from itertools import permutations
from itertools import combinations

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

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

def nu():
	return int(input())

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

def lcm(x, y):
	gg = find_gcd(x, y)
	return x * y // gg
mm = 1000000007

def solve():
	t = nu()
	for tt in range(t):
		(n, a, b, c, d) = num()
		za = a - b
		zb = a + b
		za *= n
		zb *= n
		cc = c - d
		dd = c + d
		if za >= cc and za <= dd:
			print('YES')
		elif cc >= za and cc <= zb:
			print('YES')
		else:
			print('NO')
solve()


for _ in range(int(input())):
	(n, a, b, c, d) = map(int, input().split())
	a_b = a - b
	a__b = a + b
	c_d = c - d
	c__d = c + d
	ab1 = a_b * n
	ab2 = a__b * n
	if ab1 > c__d or ab2 < c_d:
		print('No')
	else:
		print('Yes')


for _ in range(int(input())):
	(n, a, b, c, d) = map(int, input().split())
	x = (a - b) * n
	y = (b + a) * n
	low = c - d
	high = c + d
	res = 'No'
	if x >= low and x <= high:
		res = 'Yes'
	elif y <= high and y >= low:
		res = 'Yes'
	elif x <= low and y >= high:
		res = 'Yes'
	print(res)


import math
from collections import Counter
L = lambda : list(map(int, input().split()))
M = lambda : map(int, input().split())
I = lambda : int(input())
IN = lambda : input()
mod = 10 ** 9 + 7

def s(a):
	print(' '.join(list(map(str, a))))
for i in range(int(input())):
	(n, a, b, c, d) = map(int, input().split())
	f = 0
	mini = n * (a - b)
	maxi = n * (a + b)
	if mini < c - d and maxi < c - d or (mini > c + d and maxi > c + d):
		print('NO')
	else:
		print('YES')


t = int(input())
for _ in range(t):
	(n, a, b, c, d) = list(map(int, input().split(' ')))
	ss = a + b
	dd = a - b
	if n * ss >= c - d and n * dd <= c + d:
		print('Yes')
	else:
		print('No')


import os
import sys
from io import BytesIO, IOBase

def iin():
	return int(input())

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

def main():
	T = iin()
	for _ in range(T):
		(n, a, b, c, d) = lin()
		(l, r) = (max(c - d, (a - b) * n), min(c + d, (a + b) * n))
		print('Yes' if l <= r else '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()


t = int(input())
for _ in range(t):
	(n, a, b, c, d) = map(int, input().split())
	mg = n * (a - b)
	Mg = n * (a + b)
	mp = c - d
	Mp = c + d
	if mg <= Mp and Mg >= mp:
		print('Yes')
	else:
		print('No')


for i in range(int(input())):
	(n, a, b, c, d) = map(int, input().split())
	x = n * (a - b)
	y = n * (a + b)
	if c - d > y or x > c + d:
		print('NO')
	else:
		print('YES')


for _ in range(int(input())):
	(n, a, b, c, d) = list(map(int, input().split()))
	x = a - b
	y = a + b
	z = c - d
	k = c + d
	if n * x >= z and n * x <= k or (n * y >= z and n * y <= k) or (n * x <= z and n * y >= k):
		print('Yes')
	else:
		print('No')


t = int(input())
while t > 0:
	line = input().split()
	a = int(line[0]) * (int(line[1]) - int(line[2]))
	b = int(line[0]) * (int(line[1]) + int(line[2]))
	c = int(line[3]) - int(line[4])
	d = int(line[3]) + int(line[4])
	if a <= c and b >= c and (b <= d) or (a >= c and b <= d) or (a >= c and a <= d and (b >= d)) or (a <= c and b >= d):
		print('Yes')
	else:
		print('No')
	t -= 1


t = int(input())
for i in range(t):
	(n, a, b, c, d) = list(map(int, input().split()))
	pesoT = c + d
	pesoM = c - d
	pesoTG = n * (a + b)
	pesoMG = n * (a - b)
	if pesoMG > pesoT or pesoTG < pesoM:
		print('No')
	else:
		print('Yes')


from sys import stdin, stdout
from math import *
from heapq import *
from collections import *

def main():
	ntest = int(stdin.readline())
	for test_case in range(ntest):
		(n, a, b, c, d) = [int(x) for x in stdin.readline().split()]
		l = c - d
		r = c + d
		L = a - b
		R = a + b
		res = 'No'
		for s in range(l, r + 1):
			xl = s // n
			xr = xl
			if s % n > 0:
				xr += 1
			if L <= xl and xr <= R:
				res = 'Yes'
		stdout.write('%s\n' % res)
	return 0
main()


for s in [*open(0)][1:]:
	(n, a, b, c, d) = map(int, s.split())
	print(['YES', 'NO'][c + d < n * (a - b) or (a + b) * n < c - d])


for _ in range(int(input())):
	(n, a, b, c, d) = list(map(int, input().split()))
	mi = (a - b) * n
	ma = (a + b) * n
	bmi = c - d
	bma = c + d
	flag = 1
	for i in range(bmi, bma + 1):
		if i >= mi and i <= ma:
			print('YES')
			flag = 0
			break
	if flag:
		print('NO')


def check_in(left, right, mid):
	return left <= mid <= right

def get_current_interval_n(min_weight, max_weight, x, n):
	res = False
	current_weight = x * n
	if min_weight <= current_weight <= max_weight:
		res = True
	div1 = min_weight - current_weight
	div2 = max_weight - current_weight
	return (res, div1, div2)

def search_x(left_l, rigth_r, n, xl, xr):
	x1 = xl
	x2 = xr
	mid = 0
	while x1 + 1 < x2:
		mid = (x1 + x2) // 2
		(maybe, current_div1, current_div2) = get_current_interval_n(left_l, rigth_r, mid, n)
		if maybe:
			return True
		if current_div2 >= 0:
			x1 = mid
		elif current_div1 <= 0:
			x2 = mid
		else:
			return False
	current_weight1 = x1 * n
	current_weight2 = x2 * n
	if check_in(left_l, rigth_r, current_weight1) or check_in(left_l, rigth_r, current_weight2):
		return True
	elif n > 1:
		if n > rigth_r - current_weight1 > 0 and x1 < xr:
			return True
		elif n > abs(rigth_r - current_weight1) > 0 and x1 > xl:
			return True
	return False
n = int(input())
for i in range(n):
	k = input().split()
	k = [int(x) for x in k]
	l = k[3] - k[4]
	r = k[3] + k[4]
	xl = k[1] - k[2]
	xr = k[1] + k[2]
	if search_x(l, r, k[0], xl, xr):
		print('Yes')
	else:
		print('No')


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

def I():
	return int(input())

def S():
	return str(input())

def L():
	return list(R())
from collections import Counter
import math
import sys
from itertools import permutations
import bisect
for _ in range(I()):
	(n, a, b, c, d) = R()
	print(['No', 'Yes'][max((a - b) * n, c - d) <= min((a + b) * n, c + d)])


for t in range(int(input())):
	(n, a, b, c, d) = map(int, input().split())
	eachmin = a - b
	eachmax = a + b
	totalmin = c - d
	totalmax = c + d
	if n * eachmax < totalmin or n * eachmin > totalmax:
		print('No')
	else:
		print('Yes')


import sys, random
from bisect import bisect_left, bisect_right
input = sys.stdin.readline

def main():
	inf = 10 ** 20
	t = int(input())
	for _ in range(1, t + 1):
		(n, a, b, c, d) = map(int, input().split())
		total = n * (a - b)
		if abs(total - c) <= d:
			print('YES')
			continue
		if total - c > d:
			print('NO')
			continue
		can = 2 * b * n
		if can + total >= c - d:
			print('YES')
		else:
			print('NO')
main()


t = int(input())
for i in range(t):
	(n, a, b, c, d) = map(int, input().split())
	n1 = abs(a - b)
	n2 = abs(a + b)
	w1 = abs(c - d)
	w2 = abs(c + d)
	if n * n2 < w1 or n * n1 > w2:
		print('NO')
	else:
		print('YES')


from __future__ import division, print_function
import sys
if sys.version_info[0] < 3:
	from __builtin__ import xrange as range
	from future_builtins import ascii, filter, hex, map, oct, zip
import os, sys, bisect, copy
from collections import defaultdict, Counter, deque
if os.path.exists('in.txt'):
	sys.stdin = open('in.txt', 'r')
if os.path.exists('out.txt'):
	sys.stdout = open('out.txt', 'w')

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

def mapi(arg=0):
	return map(int if arg == 0 else str, input().split())
for _ in range(int(input())):
	res = 0
	(n, a, b, c, d) = mapi()
	if n * (a - b) > c + d or n * (a + b) < c - d:
		print('No')
	else:
		print('Yes')


p = []
t = int(input())
for i in range(t):
	(n, a, b, c, d) = [int(x) for x in input().split()]
	if b == 0:
		w = a * n
		min = c - d
		max = c + d
		if w >= min and w <= max:
			p.append('YES')
		else:
			p.append('NO')
	elif d == 0:
		min = (a - b) * n
		max = (a + b) * n
		if c >= min and c <= max:
			p.append('YES')
		else:
			p.append('NO')
	elif b == 0 and d == 0:
		if a * n == c:
			p.append('YES')
		else:
			p.append('NO')
	else:
		w_min = (a - b) * n
		w_max = (a + b) * n
		t_min = c - d
		t_max = c + d
		if t_min >= w_min and t_min <= w_max or (t_max >= w_min and t_max <= w_max) or (w_min >= t_min and w_min <= t_max) or (w_max >= t_min and w_max <= t_max):
			p.append('YES')
		else:
			p.append('NO')
for x in p:
	print(x)


t = int(input())
for _ in range(t):
	(n, a, b, c, d) = [int(x) for x in input().split()]
	lo = a - b
	hi = a + b
	finLo = n * (a - b)
	finHi = n * (a + b)
	alo = c - d
	ahi = c + d
	if finLo >= alo and finHi <= ahi:
		print('Yes')
	elif finLo <= alo <= finHi or finLo <= ahi <= finHi:
		print('Yes')
	else:
		print('No')


t = int(input())
for _ in range(t):
	(n, a, b, c, d) = map(int, input().split())
	lowBGrain = n * (a - b)
	highBGrain = n * (a + b)
	lowBPackage = c - d
	highBPackage = c + d
	if highBGrain < lowBPackage or highBPackage < lowBGrain:
		print('No')
	else:
		print('Yes')


t = int(input())
while t:
	(n, a, b, c, d) = map(int, input().split())
	d1 = a - b
	d2 = a + b
	d3 = c - d
	d4 = c + d
	if n * d1 < d3 and n * d2 < d3:
		print('NO')
	elif n * d2 > d4 and n * d1 > d4:
		print('NO')
	else:
		print('YES')
	t -= 1


def task(n, a, b, c, d):
	if (a - b) * n <= c + d and (a + b) * n >= c - d:
		print('YES')
	else:
		print('NO')
t = int(input())
for i in range(0, t):
	(n, a, b, c, d) = map(int, input().split())
	task(n, a, b, c, d)


from sys import stdin
input = stdin.readline

def main():
	test = int(input())
	for t in range(test):
		l = [int(i) for i in input().split(' ')]
		n = l[0]
		a = l[1]
		b = l[2]
		c = l[3]
		d = l[4]
		if (a - b) * n <= c + d and (a + b) * n >= c - d:
			print('YES')
		else:
			print('NO')
main()


t = int(input())
for _ in range(t):
	(n, a, b, c, d) = map(int, input().split())
	o = a - b
	p = a + b
	x = c - d
	y = c + d
	if o * n > y or p * n < x:
		print('No')
	else:
		print('Yes')


p = int(input())
for z in range(p):
	(n, a, b, c, d) = [int(i) for i in input().split()]
	sr = (c + d) / n
	sl = (c - d) / n
	xr = a + b
	xl = a - b
	if xl > sr or xr < sl:
		print('No')
	else:
		print('Yes')


import sys
T = int(input())
for _ in range(0, T):
	(n, a, b, c, d) = map(int, input().split())
	x = 0
	if abs(c - d) <= n * abs(a + b) and c + d >= n * (a - b):
		x = 1
	if x == 1:
		print('YES')
	else:
		print('NO')


t = int(input())
while t > 0:
	t -= 1
	(n, a, b, c, d) = map(int, input().split())
	x = (a - b) * n
	y = (a + b) * n
	i = c - d
	j = c + d
	if y < i or x > j:
		print('No')
	else:
		print('Yes')


from sys import stdin, stdout
read = stdin.readline
write = stdout.write
for _ in range(int(read())):
	(n, a, b, c, d) = map(int, read().split())
	(min_val, max_val) = ((c - d) / n, (c + d) / n)
	if a - b > max_val or a + b < min_val:
		write('No' + '\n')
	else:
		write('Yes' + '\n')


for _ in range(int(input())):
	(n, a, b, c, d) = map(int, input().split())
	inc = 2 * b * n
	minsum = n * (a - b)
	if minsum > c + d:
		print('No')
		continue
	if minsum < c - d:
		t = c - d - minsum
		if inc >= t:
			print('Yes')
		else:
			print('No')
		continue
	print('Yes')


def fun(a, b, c, d, n):
	if (a - b) * n > c + d:
		return 'No'
	elif (a + b) * n < c - d:
		return 'No'
	else:
		return 'Yes'
t = int(input())
for i in range(t):
	s = input()
	L = s.split()
	n = int(L[0])
	a = int(L[1])
	b = int(L[2])
	c = int(L[3])
	d = int(L[4])
	print(fun(a, b, c, d, n))


import math

def s():
	(n, a, b, c, d) = [int(x) for x in input().split(' ')]
	if n * (a - b) > c + d or n * (a + b) < c - d:
		print('No')
	else:
		print('Yes')
t = int(input())
for i in range(t):
	s()


import sys
import math
input = sys.stdin.buffer.readline
for _ in range(int(input())):
	(n, a, b, c, d) = map(int, input().split())
	maxG = a + b
	minG = a - b
	maxP = c + d
	minP = c - d
	if n * maxG >= minP and n * minG <= maxP:
		print('Yes')
	else:
		print('No')


def f(n, a, b, c, d):
	if n * (a + b) < c - d or n * (a - b) > c + d:
		return 'No'
	else:
		return 'Yes'
lst = []
for _ in range(int(input())):
	(n, a, b, c, d) = map(int, input().split())
	lst.append(f(n, a, b, c, d))
for i in lst:
	print(i)


import bisect
import os
from collections import Counter
import bisect
from collections import defaultdict
import math
import random
import heapq as hq
from math import sqrt
import sys
from functools import reduce, cmp_to_key
from collections import deque
import threading
from itertools import combinations
from io import BytesIO, IOBase
from itertools import accumulate

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

def iinput():
	return int(input())

def tinput():
	return input().split()

def rinput():
	return map(int, tinput())

def rlinput():
	return list(rinput())

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)))
for _ in range(iinput()):
	(n, a, b, c, d) = rinput()
	print('YES' if n * (a - b) <= c + d and n * (a + b) >= c - d else 'NO')


from math import *
for zz in range(int(input())):
	(n, a, b, c, d) = map(int, input().split())
	ha = False
	lb = (a - b) * n
	ub = (a + b) * n
	if lb > c + d or ub < c - d:
		print('No')
	else:
		print('Yes')


for __ in range(int(input())):
	(n, a, b, c, d) = list(map(int, input().split()))
	min_w = (a - b) * n
	max_w = (a + b) * n
	tot_min = c - d
	tot_max = c + d
	ans = 0
	for i in range(tot_min, tot_max + 1):
		if min_w <= i <= max_w:
			ans = 1
			break
	if ans == 1:
		print('YES')
	else:
		print('NO')


import sys
firstLine = True
for line in sys.stdin:
	if firstLine:
		numTests = int(line)
		firstLine = False
		continue
	(n, a, b, c, d) = map(int, line.strip().split())
	minWeight = n * (a - b)
	maxWeight = minWeight + n * 2 * b
	if maxWeight < c - d or minWeight > c + d:
		print('No')
	else:
		print('Yes')


t = int(input())
for i in range(t):
	(n, a, b, c, d) = map(int, input().split())
	minim = (a - b) * n
	maxi = (a + b) * n
	totmin = c - d
	totmax = c + d
	if minim >= totmin and minim <= totmax or (maxi >= totmin and maxi <= totmax):
		print('YES')
	elif minim <= totmin and maxi >= totmin or (minim <= totmax and maxi >= totmax):
		print('YES')
	else:
		print('NO')


tc = int(input().strip())

def solve():
	(n, a, b, c, d) = map(int, input().strip().split(' '))
	if n * (a + b) >= c - d and n * (a - b) <= c + d:
		print('Yes')
	else:
		print('No')
for t in range(1, tc + 1):
	solve()


import sys
import collections, itertools, bisect, heapq, math, string

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

def main():
	t = int(input())
	nums = [list(map(int, input().split())) for x in range(t)]
	for n in nums:
		(count, a, b, c, d) = (n[0], n[1], n[2], n[3], n[4])
		if (a - b) * count > c + d or (a + b) * count < c - d:
			print('No')
		else:
			print('Yes')
main()


from collections import defaultdict
import bisect
import sys
input = sys.stdin.readline

def solve(n, a, b, c, d):
	if not (c + d < n * (a - b) or c - d > n * (a + b)):
		print('Yes')
	else:
		print('No')

def main():
	t = int(input())
	for i in range(t):
		(n, a, b, c, d) = map(int, input().split())
		solve(n, a, b, c, d)
main()


def ans(n, a, b, c, d):
	f = 0
	x = abs(a - b)
	x1 = a + b
	y = abs(c - d)
	y1 = c + d
	if x * n == y or x1 * n == y1:
		print('yes')
	elif x1 * n < y:
		print('No')
	else:
		f = y1 // n
		if f < x:
			print('No')
		else:
			print('Yes')
t = int(input())
while t > 0:
	(n, a, b, c, d) = map(int, input().split())
	ans(n, a, b, c, d)
	t -= 1


t = int(input())
res = []
for _ in range(t):
	(n, a, b, c, d) = map(int, input().split())
	if n * (a + b) < c - d or c + d < n * (a - b):
		res.append('NO')
	else:
		res.append('YES')
for i in range(0, t):
	print(res[i])


import sys
from sys import stdin, stdout
import bisect
from bisect import bisect_left as bl
from bisect import bisect_right as br
import itertools
import collections
import math
import heapq

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

def cin():
	return map(int, sin().split())

def ain():
	return list(map(int, sin().split()))

def sin():
	return input()

def inin():
	return int(input())

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

def most_frequent(list):
	return max(set(list), key=list.count)

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

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

def Convert(string):
	li = list(string.split(''))
	return li

def SieveOfEratosthenes(n):
	global prime
	prime = [True for i in range(n + 1)]
	p = 2
	while p * p <= n:
		if prime[p] == True:
			for i in range(p * p, n + 1, p):
				prime[i] = False
		p += 1
	f = []
	for p in range(2, n):
		if prime[p]:
			f.append(p)
	return f
prime = []
q = []

def dfs(n, d, v, c):
	global q
	v[n] = 1
	x = d[n]
	q.append(n)
	j = c
	for i in x:
		if i not in v:
			f = dfs(i, d, v, c + 1)
			j = max(j, f)
	return j

def main():
	t = inin()
	for _ in range(t):
		q1 = ain()
		n = q1[0]
		a = q1[1]
		b = q1[2]
		c = q1[3]
		d = q1[4]
		if (a - b) * n > c + d or (a + b) * n < c - d:
			print('No')
		else:
			print('Yes')
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()


n = int(input())

def is_overlapping(x1, x2, y1, y2):
	return max(x1, y1) <= min(x2, y2)
for i in range(n):
	(t, a, b, c, d) = map(int, input().split())
	if is_overlapping((a - b) * t, (a + b) * t, c - d, c + d):
		print('Yes')
	else:
		print('No')


from collections import defaultdict as dc
from heapq import *
import math
import bisect
import sys
from collections import deque as dq
from heapq import heapify, heappush, heappop
mod = 10 ** 12

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

def line():
	p = list(map(int, input().split()))
	return p

def read_mat():
	n = inp()
	a = []
	for i in range(n):
		a.append(line())
	return a

def digit(n):
	s = str(n)
	p = 0
	for i in s:
		p += int(i) ** 2
	return p

def check(a, b):
	for i in range(26):
		for j in range(len(a) + 1):
			q = a[:j] + chr(97 + i) + a[j:]
			if q == b:
				return 1
	return 0

def solve(n, a, b, c, d):
	mn = c - d
	mx = c + d
	p = a - b
	q = a + b
	if q * n < mn or p * n > mx:
		return 'No'
	return 'Yes'
for _ in range(inp()):
	(n, a, b, c, d) = line()
	l = solve(n, a, b, c, d)
	print(l)


t = int(input())
for _ in range(t):
	inp = input().split()
	n = int(inp[0])
	a = int(inp[1])
	b = int(inp[2])
	c = int(inp[3])
	d = int(inp[4])
	if c - d <= (a - b) * n <= c + d or c - d <= (a + b) * n <= c + d or (a - b) * n <= c - d <= (a + b) * n or ((a - b) * n <= c - d <= (a + b) * n):
		print('Yes')
	else:
		print('No')


m = 10 ** 9 + 7
t = int(input())
while t:
	t -= 1
	(n, a, b, c, d) = map(int, input().split())
	if c - d > n * (a + b) or c + d < n * (a - b):
		print('No')
	else:
		print('Yes')


for i in range(int(input())):
	(n, x, y, z, v) = map(int, input().split())
	if x > y:
		a = x
		b = y
	else:
		a = y
		b = x
	if z > v:
		c = z
		d = v
	else:
		c = v
		d = z
	u = 0
	e = a - b
	f = a + b
	g = c - d
	h = c + d
	if e * n > h or f * n < g:
		print('No')
		u = 1
	if u == 0:
		print('Yes')


for i in range(int(input())):
	[n, a, b, c, d] = map(int, input().split())
	ub = (a + b) * n
	lb = (a - b) * n
	if ub >= c - d and lb <= c + d:
		print('YES')
	else:
		print('NO')


import sys
t = int(input())
for _ in range(t):
	arr = input().split(' ')
	n = int(arr[0])
	a = int(arr[1])
	b = int(arr[2])
	c = int(arr[3])
	d = int(arr[4])
	pilemin = n * (a - b)
	pilemax = n * (a + b)
	packagemin = c - d
	packagemax = c + d
	if pilemin <= packagemax and pilemax >= packagemin:
		print('Yes')
	else:
		print('No')


for tt in range(int(input())):
	l = [int(i) for i in input().split()]
	if l[3] - l[4] > l[0] * (l[1] + l[2]) or l[3] + l[4] < l[0] * (l[1] - l[2]):
		print('No')
	else:
		print('Yes')


def kill(p, q, l, r):
	if p < l:
		if q < l:
			return 'No'
		else:
			return 'Yes'
	if q > r:
		if p > r:
			return 'No'
		else:
			return 'Yes'
	return 'Yes'
t = int(input())
for i in range(t):
	(x, a, b, c, d) = [int(f) for f in input().split()]
	p = (a - b) * x
	q = (a + b) * x
	r = c - d
	s = c + d
	ans = kill(p, q, r, s)
	print(ans)


from collections import defaultdict, deque
from heapq import heappush, heappop
from bisect import bisect_left, bisect_right
import sys, random, itertools, math
sys.setrecursionlimit(10 ** 5)
input = sys.stdin.readline
sqrt = math.sqrt

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

def LF():
	return list(map(float, input().split()))

def LI_():
	return list(map(lambda x: int(x) - 1, input().split()))

def II():
	return int(input())

def IF():
	return float(input())

def S():
	return input().rstrip()

def LS():
	return S().split()

def IR(n):
	return [II() for _ in range(n)]

def LIR(n):
	return [LI() for _ in range(n)]

def FR(n):
	return [IF() for _ in range(n)]

def LFR(n):
	return [LI() for _ in range(n)]

def LIR_(n):
	return [LI_() for _ in range(n)]

def SR(n):
	return [S() for _ in range(n)]

def LSR(n):
	return [LS() for _ in range(n)]
mod = 1000000007
inf = float('INF')

def solve():

	def f(n, a, b, c, d):
		return ((a - b) * n <= c + d) & ((a + b) * n >= c - d)
	for _ in range(II()):
		(n, a, b, c, d) = LI()
		print('Yes' if f(n, a, b, c, d) else 'No')
	return
solve()


def solve():
	(n, a, b, c, d) = map(int, input().split())
	min_grain = (a - b) * n
	max_grain = (a + b) * n
	min_pack = c - d
	max_pack = c + d
	if max_grain >= min_pack and min_grain <= max_pack:
		print('Yes')
	else:
		print('No')
t = int(input())
for _ in range(t):
	solve()


t = int(input())
for i in range(t):
	(n, a, b, c, d) = map(int, input().split(' '))
	l1 = a - b
	l2 = a + b
	m1 = c - d
	m2 = c + d
	l1 *= n
	l2 *= n
	k = 0
	if l1 >= m1 and l1 <= m2:
		k = 1
	if l2 >= m1 and l2 <= m2:
		k = 1
	if l1 <= m1 and l2 >= m2:
		k = 1
	if k == 1:
		print('YES')
	else:
		print('NO')


def ans(n, a, b, c, d):
	maxMass = (a + b) * n
	minMass = (a - b) * n
	if c - d <= maxMass <= c + d or c - d <= minMass <= c + d or (minMass < c - d and maxMass > c + d):
		return 'Yes'
	else:
		return 'No'
t = int(input())
for i in range(t):
	(n, a, b, c, d) = map(int, input().split())
	print(ans(n, a, b, c, d))


q = int(input())
while q > 0:
	q -= 1
	(a, b, c, d, e) = map(lambda x: int(x), input().split(' '))
	aa = a * (b - c)
	bb = a * (b + c)
	if aa >= d - e and aa <= d + e:
		print('YES')
	elif bb >= d - e and bb <= d + e:
		print('YES')
	elif aa < d - e and bb > d + e:
		print('YES')
	else:
		print('NO')


t = int(input())
for i in range(t):
	(n, a, b, c, d) = [int(i) for i in input().split()]
	g1 = a - b
	g2 = a + b
	b1 = c - d
	b2 = c + d
	if g1 * n >= b1 and g1 * n <= b2:
		print('YES')
	elif g2 * n >= b1 and g2 * n <= b2:
		print('YES')
	elif g1 * n < b1 and g2 * n > b2:
		print('YES')
	else:
		print('NO')


import sys
input = sys.stdin.readline
from collections import Counter

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 print_list_int(l):
	print(''.join(map(str, map(int, l))))
t = inp()
for test in range(t):
	(n, a, b, c, d) = inlt()
	possible = False
	if n * (a + b) >= c - d and n * (a - b) <= c + d:
		possible = True
	if possible:
		print('Yes')
	else:
		print('No')


s = int(input())
for i in range(s):
	(n, a, b, c, d) = [int(i) for i in input().split(' ')]
	total_min = (a - b) * n
	total_max = (a + b) * n
	if total_min >= c - d:
		if total_min <= c + d:
			print('Yes')
		else:
			print('No')
	elif total_max >= c - d:
		print('Yes')
	else:
		print('No')


def main():
	T = int(input())
	for t in range(T):
		(n, a, b, c, d) = list(map(int, input().split()))
		pos = True
		if (a - b) * n > c + d:
			pos = False
		elif (a - b) * n < c - d and c - d - (a - b) * n > 2 * b * n:
			pos = False
		print('YES') if pos else print('NO')
main()


import sys
input = sys.stdin.readline
t = int(input())
for r in range(t):
	(n, a, b, c, d) = map(int, input().split())
	flag = False
	sum1 = n * (a - b)
	sum2 = n * (a + b)
	for i in range(c - d, c + d + 1):
		if i >= sum1 and i <= sum2:
			flag = True
			break
	if flag == True:
		print('Yes')
	else:
		print('No')


import sys
input = sys.stdin.readline
mod = 1000000007

def power(x, y):
	res = 1
	while y > 0:
		if y & 1 == 1:
			res = res * x % m
		y = y >> 1
		x = x * x % m
	return res % m
for _ in range(int(input())):
	(n, a, b, c, d) = map(int, input().split())
	dif1 = abs(a - b) * n
	su1 = (a + b) * n
	if su1 < abs(c - d) or dif1 > c + d:
		print('NO')
	else:
		print('YES')


t = int(input())
for i in range(t):
	(n, a, b, c, d) = map(int, input().split())
	lz = (a - b) * n
	rz = (a + b) * n
	lu = c - d
	ru = c + d
	if lz > ru or rz < lu:
		print('NO')
		continue
	print('YES')


import sys
t = int(input())
for q in range(t):
	(n, a, b, c, d) = map(int, input().split())
	if (a - b) * n > c + d or (a + b) * n < c - d:
		print('No')
	else:
		print('Yes')


n = int(input())
for _ in range(n):
	s = input().split(' ')
	m = 0
	tot = int(s[0])
	x = int(s[1]) + int(s[2])
	y = int(s[1]) - int(s[2])
	m = int(s[3]) + int(s[4])
	n = int(s[3]) - int(s[4])
	z = int(s[0])
	a = x * z
	b = y * z
	if a <= m and a >= n:
		print('Yes')
	elif b <= m and b >= n:
		print('Yes')
	elif a > m and b < n:
		print('Yes')
	else:
		print('No')


t = int(input())
for _ in range(t):
	(n, a, b, c, d) = map(int, input().split())
	flag = False
	for i in range(c - d, c + d + 1):
		if i >= n * (a - b) and i <= n * (a + b):
			flag = True
			break
	if flag:
		print('Yes')
	else:
		print('No')


n = int(input())
for x in range(n):
	m = list(map(int, input().split()))
	k = m[0]
	a = m[1]
	b = m[2]
	c = m[3]
	d = m[4]
	j = (a - b) * k
	v = (a + b) * k
	z = c - d
	g = c + d
	if v < z or g < j:
		print('No')
	else:
		print('Yes')


def binary(n, a, b, c, d):
	if a * n > d or b * n < c:
		return 'No'
	return 'Yes'
for i in range(int(input())):
	(n, a, b, c, d) = map(int, input().split())
	print(binary(n, a - b, a + b, c - d, c + d))


for i in range(0, int(input())):
	(n, a, b, c, d) = list(map(int, input().split()))
	(t1, t2) = (n * (a + b), n * (a - b))
	if t2 <= c + d and t1 >= c - d:
		print('Yes')
	else:
		print('No')


def read_int():
	return int(input().strip())

def read_ints():
	return list(map(int, input().strip().split(' ')))

def solve():
	(n, a, b, c, d) = read_ints()
	min_package = (a - b) * n
	max_package = (a + b) * n
	if c - d <= min_package <= c + d or c - d <= max_package <= c + d or (min_package <= c - d and c + d <= max_package):
		return 'Yes'
	return 'No'
T = read_int()
for _ in range(T):
	print(solve())


for i in range(int(input())):
	(n, a, b, c, d) = map(int, input().split())
	count = 0
	if n * (a - b) > c + d:
		print('No')
	elif n * (a + b) < c - d:
		print('No')
	else:
		print('Yes')


t = int(input())
while t > 0:
	a = list(map(int, input().split()))
	(n, a, b, c, d) = (a[0], a[1], a[2], a[3], a[4])
	key = 0
	for i in range(c - d, c + d + 1):
		if i <= n * (a + b) and i >= n * (a - b):
			key = 1
			break
	if key == 1:
		print('YES')
	else:
		print('NO')
	t -= 1


n = int(input())
while n:
	n = n - 1
	(tn, a, b, c, d) = map(int, input().split())
	absum = (a + b) * tn
	absub = (a - b) * tn
	cdsum = c + d
	cdsub = c - d
	if cdsub >= absub and cdsub <= absum or (cdsum >= absub and cdsum <= absum) or (absub >= cdsub and absub <= cdsum) or (absum >= cdsub and absum <= cdsum):
		print('YES')
	else:
		print('NO')


t = int(input())
for _ in range(0, t):
	(n, a, b, c, d) = map(int, input().split())
	x = a - b
	y = a + b
	f = 0
	if n * y >= c - d and n * x <= c + d:
		f = 1
	if f == 1:
		print('Yes')
	else:
		print('No')


t = int(input())
for i in range(t):
	(n, a, b, c, d) = map(int, input().split())
	m1 = a + b
	m2 = a - b
	c1 = c + d
	c2 = c - d
	if m1 * n >= c2 and m2 * n <= c1:
		print('YES')
	else:
		print('NO')


t = input()
t = float(t)
while t > 0:
	(n, a, b, c, d) = input().split()
	a = int(a)
	b = int(b)
	c = int(c)
	d = int(d)
	n = int(n)
	absum = a + b
	absub = a - b
	cdsum = c + d
	cdsub = c - d
	if n * absum >= cdsub and n * absub <= cdsum:
		print('YES')
	else:
		print('No')
	t -= 1


for _ in range(int(input())):
	(n, a, b, c, d) = map(int, input().split())
	ans = False
	if n * (a - b) > c + d:
		ans = False
	elif abs(c - d) - n * a <= n * b:
		ans = True
	else:
		ans = False
	if ans:
		print('Yes')
	else:
		print('No')


t = int(input())
for _ in range(t):
	(n, a, b, c, d) = map(int, input().split())
	a1 = abs(a - b)
	a2 = abs(a + b)
	b1 = abs(c - d)
	b2 = abs(c + d)
	if n * a2 < b1 or n * a1 > b2:
		print('No')
	else:
		print('Yes')


n = int(input())
for ewr in range(n):
	temp = list(map(int, input().split(' ')))
	t = temp[0]
	mi = temp[1] - temp[2]
	ma = temp[1] + temp[2]
	lo = t * mi
	hi = t * ma
	i = temp[3] - temp[4]
	p = temp[3] + temp[4]
	if hi >= i and hi <= p or (lo >= i and lo <= p) or (lo <= i and hi >= p):
		print('YES')
	else:
		print('NO')


N = int(input())
for i in range(N):
	(n, a, b, c, d) = map(int, input().split())
	(wmin, wmax) = (n * (a - b), n * (a + b))
	if wmax < c - d or wmin > c + d:
		print('No')
	else:
		print('Yes')


def solve(n, a, b, c, d):
	ma = c + d
	mi = c - d
	if n * (a + b) >= mi and n * (a - b) <= ma:
		return 'Yes'
	else:
		return 'No'
no = int(input())
for s in range(no):
	(n, a, b, c, d) = tuple(map(int, input().strip().split()))
	print(solve(n, a, b, c, d))


for i in range(int(input())):
	(n, a, b, c, d) = map(int, input().split())
	start = c + d
	end = c - d
	s = a + b
	e = a - b
	count1 = s * n
	count2 = e * n
	if start >= count1 >= end or start >= count2 >= end or (count1 > start and count2 < end):
		print('Yes')
	else:
		print('No')


t = int(input())
for _ in range(t):
	(n, a, b, c, d) = map(int, input().split())
	minval = a - b
	maxval = a + b
	minans = c - d
	maxans = c + d
	ans = maxval * n
	if ans < minans:
		print('No')
		continue
	count = n
	while ans > maxans and count > 0:
		if ans > maxans:
			if maxans - ans >= minval and maxans - ans <= maxval:
				print('Yes')
				break
			ans -= min(ans - maxans, maxval - minval)
			count -= 1
	else:
		if ans <= maxans:
			print('Yes')
		else:
			print('No')


q = int(input())
while q > 0:
	q -= 1
	(n, a, b, c, d) = map(int, input().split())
	x = (a - b) * n
	y = (a + b) * n
	l = max(x, c - d)
	r = min(y, c + d)
	if l <= r:
		print('Yes')
	else:
		print('No')


def solve(n, a, b, c, d):
	if (a - b) * n <= c + d and (a + b) * n >= c - d:
		return True
	return False
t = int(input())
for q in range(t):
	(n, a, b, c, d) = map(int, input().split())
	if solve(n, a, b, c, d):
		print('Yes')
	else:
		print('No')


t = int(input())
Ans = []
for i in range(t):
	(n, a, b, c, d) = list(map(int, input().split()))
	found = False
	if (a + b) * n < c - d or (a - b) * n > c + d:
		found = False
	else:
		found = True
	if found:
		Ans.append('YES')
	else:
		Ans.append('NO')
print(*Ans)


n = int(input())
for i in range(n):
	b = list(map(int, input().split()))
	k = b[0] * (b[1] - b[2])
	p = b[0] * (b[1] + b[2])
	r = b[3] - b[4]
	s = b[3] + b[4]
	g = 0
	if p in range(r, s + 1):
		g = 1
	elif k in range(r, s + 1):
		g = 1
	elif p > s and k < r:
		g = 1
	if g == 0:
		print('No')
	else:
		print('Yes')


import math
for _ in range(int(input())):
	(n, a, b, c, d) = map(int, input().split())
	mi = a - b
	ma = a + b
	kmi = c - d
	kma = c + d
	if n * mi <= kma and n * ma >= kmi:
		print('Yes')
	else:
		print('No')


for t in range(int(input())):
	(n, a, b, c, d) = map(int, input().split())
	(r1, r2, s1, s2) = (a - b, a + b, c - d, c + d)
	flag = True
	if r2 * n < s1 or r1 * n > s2:
		flag = False
	print('Yes' if flag else 'No')


t = int(input())
for _ in range(t):
	(n, a, b, c, d) = map(int, input().split())
	if n * (a - b) >= c - d and n * (a - b) <= c + d:
		print('Yes')
		continue
	if n * (a + b) >= c - d and n * (a - b) <= c + d:
		print('Yes')
		continue
	print('No')


import sys
input = sys.stdin.readline
t = int(input())
for _ in range(t):
	(n, a, b, c, d) = map(int, input().split())
	l = (a - b) * n
	r = (a + b) * n
	if l <= c - d and r >= c - d:
		print('Yes')
	elif l >= c - d and l <= c + d:
		print('Yes')
	else:
		print('No')


def main():
	t = int(input())
	for _ in range(t):
		(n, a, b, c, d) = map(int, input().split())
		low = c - d
		high = c + d
		r1 = n * (a - b)
		r2 = n * (a + b)
		if low > r1 and low > r2 and (high > r1) and (high > r2) or (low < r1 and low < r2 and (high < r1) and (high < r2)):
			print('No')
		else:
			print('Yes')
main()


import sys
readline = sys.stdin.readline
for _ in range(int(input())):
	(n, a, b, c, d) = map(int, readline().split())
	min_total = (a - b) * n
	max_total = (a + b) * n
	if c - d <= min_total <= c + d or c - d <= max_total <= c + d or min_total <= c - d <= c + d <= max_total:
		print('Yes')
	else:
		print('No')


import sys
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())
tests = inp()
testcount = 0
while testcount < tests:
	(n, a, b, c, d) = invr()
	if n * (a - b) > c + d or n * (a + b) < c - d:
		print('No')
	else:
		print('Yes')
	testcount += 1


n_cases = int(input())
for case_num in range(n_cases):
	(n, a, b, c, d) = [int(x) for x in input().split()]
	lo = n * (a - b)
	hi = n * (a + b)
	if lo > c + d or hi < c - d:
		print('No')
	else:
		print('Yes')


t = int(input())
for _ in range(t):
	(n, a, b, c, d) = map(int, input().split())
	A = (a - b) * n
	B = (a + b) * n
	C = c - d
	D = c + d
	temp = 0
	if B >= C and B <= D:
		temp = 1
	elif A <= D and A >= C:
		temp = 1
	elif A <= C and B >= D:
		temp = 1
	elif A >= C and B <= D:
		temp = 1
	if temp == 0:
		print('NO')
	else:
		print('YES')


for _ in range(int(input())):
	(n, a, b, c, d) = map(int, input().split())
	s = a - b
	r = a + b
	s2 = c - d
	r2 = c + d
	if n * s > r2 or n * r < s2:
		print('NO')
	else:
		print('YES')


for _ in range(int(input())):
	(n, a, b, c, d) = map(int, input().split())
	m1 = (a - b) * n
	m2 = (a + b) * n
	m3 = c - d
	m4 = c + d
	if m2 >= m3 and m1 <= m4:
		print('YES')
	else:
		print('NO')


cases = int(input())
for case in range(cases):
	values = list(map(lambda x: int(x), input().split()))
	(number, a, b, c, d) = values
	(min_grain, max_grain) = (a - b, a + b)
	(min_pack, max_pack) = (c - d, c + d)
	if number * max_grain < min_pack or number * min_grain > max_pack:
		print('No')
	else:
		print('Yes')


t = int(input())
for _ in range(t):
	(n, a, b, c, d) = map(int, input().split())
	x = a - b
	y = a + b
	nx = x * n
	ny = y * n
	if nx >= c - d and nx <= c + d or (ny >= c - d and ny <= c + d):
		print('Yes')
	elif nx < c - d and ny > c + d:
		print('Yes')
	else:
		print('No')


t = int(input())
testcaseList = []
for testcaseIndex in range(t):
	(n, a, b, c, d) = list(map(int, input().split()))
	testcaseList.append([n, a, b, c, d])
for (n, a, b, c, d) in testcaseList:
	smallest_x = a - b
	largest_x = a + b
	smallest_sum = c - d
	largest_sum = c + d
	isValid = False
	for total in range(smallest_sum, largest_sum + 1):
		testValue = float(total) / float(n)
		if smallest_x <= testValue and testValue <= largest_x:
			isValid = True
			break
	if isValid == True:
		print('Yes')
	else:
		print('No')


for i in range(int(input())):
	(n, a, b, c, d) = map(int, input().split())
	x1 = n * (a - b)
	x2 = n * (a + b)
	y1 = c - d
	y2 = c + d
	z1 = max(x1, y1)
	z2 = min(x2, y2)
	if z1 <= z2:
		print('Yes')
	else:
		print('No')


t = int(input())
while t != 0:
	t -= 1
	(n, a, b, c, d) = map(int, input().strip().split())
	mini = (a - b) * n
	maxi = (a + b) * n
	maxisum = c + d
	minisum = c - d
	if mini >= minisum and mini <= maxisum or (maxi >= minisum and maxi <= maxisum) or (mini < minisum and maxi > maxisum):
		print('Yes')
	else:
		print('No')


def func(lower_sum, upper_sum, total_lower, total_upper):
	if lower_sum <= total_lower and total_lower <= upper_sum or (lower_sum <= total_upper and total_upper <= upper_sum):
		return 'Yes'
	elif total_lower <= lower_sum and lower_sum <= total_upper or (total_lower <= upper_sum and upper_sum <= total_upper):
		return 'Yes'
	return 'No'
t = int(input(''))
res = []
for _ in range(t):
	(n, a, b, c, d) = [int(x) for x in input('').split(' ')]
	lower_sum = (a - b) * n
	upper_sum = (a + b) * n
	total_lower = c - d
	total_upper = c + d
	res.append(func(lower_sum, upper_sum, total_lower, total_upper))
for r in res:
	print(r)


t = int(input())
while t > 0:
	t -= 1
	(n, a, b, c, d) = map(int, input().split())
	l = n * abs(a - b)
	r = n * (a + b)
	p = abs(c - d)
	q = c + d
	if l > q or r < p:
		print('No')
	else:
		print('Yes')


for z in range(int(input())):
	(n, a, b, c, d) = list(map(int, input().split()))
	count = 0
	lbg = abs(a - b)
	ubg = b + a
	lbp = abs(c - d)
	ubp = c + d
	flag = 0
	if lbp > lbg * n and ubg * n >= ubp:
		print('YES')
	else:
		for i in range(lbg, ubg + 1):
			if lbp <= n * i <= ubp:
				print('Yes')
				flag = 1
				break
		if flag == 0:
			print('No')


(t, *L) = map(int, open(0).read().split())
ans = []
for (n, a, b, c, d) in zip(*[iter(L)] * 5):
	if (a - b) * n <= c + d and c - d <= (a + b) * n:
		ans.append('Yes')
	else:
		ans.append('No')
print('\n'.join(ans))


T = int(input())
while T:
	(n, a, b, c, d) = map(int, input().split())
	A = n * (a - b)
	B = n * (a + b)
	C = c - d
	D = c + d
	if (C <= A <= D or C <= B <= D) or (A <= C <= B or A <= D <= B):
		print('Yes')
	else:
		print('No')
	T -= 1


from collections import defaultdict, Counter
from math import ceil
alph = 'abcdefghijklmnopqrstuvwxyz'
t = int(input())
for _ in range(t):
	(n, a, b, c, d) = map(int, input().split())
	(l1, l2) = ((a - b) * n, (a + b) * n)
	(r1, r2) = (c - d, c + d)
	if l1 > r2 or l2 < r1:
		print('NO')
	else:
		print('YES')


t = int(input())
for i10 in range(t):
	(n, a, b, c, d) = map(int, input().split())
	s1 = (a - b) * n
	s2 = (a + b) * n
	if s1 <= c + d and s2 >= c - d:
		print('Yes')
	else:
		print('No')


t = int(input())
for _ in range(t):
	(n, a, b, c, d) = input().split()
	n = int(n)
	a = int(a)
	b = int(b)
	c = int(c)
	d = int(d)
	if abs(a - b) * n <= abs(c + d):
		x = 2 * min(a, b)
		if abs(c - d) - abs(a - b) * n <= x * n:
			print('Yes')
		else:
			print('No')
	else:
		print('No')


rw = int(input())
for ewqr in range(rw):
	(n, a, b, c, d) = map(int, input().split())
	l = (a - b) * n
	r = (a + b) * n
	ls = c - d
	rs = c + d
	for i in range(ls, rs + 1):
		if l <= i <= r:
			print('YES')
			break
	else:
		print('NO')


import sys
input = sys.stdin.buffer.readline

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

def sieve(n):
	a = [1] * n
	for i in range(2, n):
		if a[i]:
			for j in range(i * i, n, i):
				a[j] = 0
	return a
for __ in range(int(input())):
	(n, a, b, c, d) = I()
	if n * (a + b) < c - d or n * (a - b) > c + d:
		print('No')
	else:
		print('Yes')


for ad in range(int(input())):
	l = list(map(int, input().split()))
	n = l[0]
	a = l[1]
	b = l[2]
	c = l[3]
	d = l[4]
	x = n * (a + b)
	y = n * (a - b)
	if c + d >= y >= c - d or c - d <= x <= c + d or y <= c - d <= c + d <= x:
		print('Yes')
	else:
		print('No')


T = int(input())
for t in range(T):
	(n, a, b, c, d) = list(map(int, input().strip().split(' ')))
	lo = a - b
	hi = a + b
	mi = c - d
	ma = c + d
	consis = True
	if lo * n > ma or hi * n < mi:
		consis = False
	if consis:
		print('Yes')
	else:
		print('No')


import sys
stdin = sys.stdin
ns = lambda : stdin.readline().rstrip()
ni = lambda : int(stdin.readline().rstrip())
nm = lambda : map(int, stdin.readline().split())
nl = lambda : list(map(int, stdin.readline().split()))

def solve():
	(n, a, b, c, d) = nm()
	if n * (a - b) > c + d or (a + b) * n < c - d:
		print('No')
	else:
		print('Yes')
t = ni()
for _ in range(t):
	solve()


def solve():
	(n, a, b, c, d) = [int(v) for v in input().split()]
	if n * (a + b) < c - d or n * (a - b) > c + d:
		print('No')
	else:
		print('Yes')
t = int(input())
for _ in range(t):
	solve()


def dotwointersect(l1, r1, l2, r2):
	if l2 > r1 or r2 < l1:
		return 0
	return 1
t = int(input())
for you in range(t):
	l = input().split()
	n = int(l[0])
	a = int(l[1])
	b = int(l[2])
	c = int(l[3])
	d = int(l[4])
	if dotwointersect(c - d, c + d, n * (a - b), n * (a + b)):
		print('Yes')
	else:
		print('No')


t = input()
t = int(t)
for i in range(t):
	(n1, a1, b1, c1, d1) = map(int, input().split())
	(n, a, b, c, d) = (int(n1), int(a1), int(b1), int(c1), int(d1))
	small = n * (a - b)
	large = n * (a + b)
	smallest = c - d
	largest = c + d
	if largest < small or large < smallest:
		print('No')
	else:
		print('Yes')


tests = int(input())
for i in range(tests):
	line = list(map(int, input().split()))
	n = line[0]
	a = line[1]
	b = line[2]
	c = line[3]
	d = line[4]
	found = False
	if (a + b) * n < c - d or (a - b) * n > c + d:
		print('No')
	else:
		print('Yes')


from collections import defaultdict, Counter
import math
from heapq import heapify, heappop, heappush
t = int(input())
for _ in range(t):
	(n, a, b, c, d) = map(int, input().strip().split())
	suml = (a - b) * n
	sumr = (a + b) * n
	if sumr >= c - d and suml <= c + d:
		print('Yes')
	else:
		print('No')


t = int(input())
l = []
for x in range(0, t):
	(n, a, b, c, d) = map(int, input().split())
	g_min = a - b
	g_max = a + b
	p_min = c - d
	p_max = c + d
	w = []
	s_min = n * g_min
	s_max = n * g_max
	if p_min in range(s_min, s_max + 1) or p_max in range(s_min, s_max + 1):
		l.append(1)
	elif s_min in range(p_min, p_max + 1) or s_max in range(p_min, p_max + 1):
		l.append(1)
	else:
		l.append(0)
for c in l:
	if c == 1:
		print('Yes')
	else:
		print('No')


t = int(input())
r1 = 0
r2 = 0
s1 = 0
s2 = 0
for i in range(t):
	(n, a, b, c, d) = map(int, input().split())
	r1 = abs(a - b)
	r2 = abs(c - d)
	s1 = a + b
	s2 = c + d
	if n * r1 >= r2 and n * r1 <= s2 or (n * s1 >= r2 and n * r1 <= s2):
		print('YES')
	else:
		print('NO')


from sys import stdin
input = stdin.readline
for _ in range(int(input())):
	(n, a, b, c, d) = map(int, input().split())
	if n * (a - b) <= c + d and n * (a + b) >= c - d:
		print('Yes')
	else:
		print('No')


for i in range(int(input())):
	(n, a, b, c, d) = map(int, input().split())
	k = (a - b) * n
	y = (a + b) * n
	if k <= c + d and y >= c - d:
		print('YES')
	else:
		print('NO')


from sys import stdin, gettrace
if not gettrace():

	def input():
		return next(stdin)[:-1]

def main():

	def solve():
		(n, a, b, c, d) = map(int, input().split())
		if n * (a + b) < c - d or n * (a - b) > c + d:
			print('No')
		else:
			print('Yes')
	q = int(input())
	for _ in range(q):
		solve()
main()


from sys import stdin
from collections import deque
mod = 10 ** 9 + 7
import sys
import random
from queue import PriorityQueue
from bisect import bisect_right
from bisect import bisect_left
from collections import defaultdict
from math import sqrt, factorial, gcd, log2, inf, ceil
import heapq
input = lambda : sys.stdin.readline().rstrip()
from sys import stdin, stdout
from heapq import heapify, heappush, heappop
from itertools import permutations
from math import factorial as f

def ncr(n, r, p):
	num = den = 1
	for i in range(r):
		num = num * (n - i) % p
		den = den * (i + 1) % p
	return num * pow(den, p - 2, p) % p
t = int(input())
for _ in range(t):
	(n, a, b, c, d) = map(int, input().split())
	mini = n * (a - b)
	maxi = n * (a + b)
	if mini > c + d:
		print('NO')
	elif maxi < c - d:
		print('NO')
	else:
		print('YES')


for _ in range(int(input())):
	(n, a, b, c, d) = map(int, input().split())
	flag = False
	if (a - b) * n <= c + d and (a + b) * n >= c - d:
		flag = True
	else:
		flag = False
	if flag:
		print('YES')
	else:
		print('NO')


for u in range(int(input())):
	(n, a, b, c, d) = map(int, input().split())
	x = (a - b) * n
	y = (a + b) * n
	xx = c - d
	yy = c + d
	if x > yy or y < xx:
		print('No')
	else:
		print('Yes')


def process():
	(n, a, b, c, d) = map(int, input().strip().split())
	a_b = a - b
	ab = a + b
	c_d = c - d
	cd = c + d
	if a_b * n > cd or ab * n < c_d:
		return 'No'
	else:
		rez = int(ab - cd / n)
		if ab - rez >= a_b:
			return 'Yes'

def main():
	n = int(input())
	for _ in range(0, n):
		print(process())
main()


for t in range(int(input())):
	(n, a, b, c, d) = map(int, input().split())
	mi = n * (a - b)
	ma = n * (a + b)
	ri = c - d
	ra = c + d
	if mi <= ra and ma >= ri:
		print('YES')
	else:
		print('NO')


from sys import stdin
cases = int(stdin.readline().strip())
for i in range(cases):
	(n, a, b, c, d) = [int(x) for x in stdin.readline().strip().split(' ')]
	if b == 0 and d == 0 and (n * a < c) or (b == 0 and d == 0 and (n * a > c)):
		print('No')
	elif b == 0 and c - d <= n * a <= c + d or (d == 0 and n * (a - b) <= c <= n * (a + b)):
		print('Yes')
	elif c + d >= n * (a - b) and c - d <= n * (a + b):
		print('Yes')
	else:
		print('No')


test = int(input())
while test:
	test -= 1
	(n, a, b, c, d) = map(int, input().split())
	a1 = (a - b) * n
	a2 = (a + b) * n
	c1 = c - d
	c2 = c + d
	if a2 >= c2 and a1 <= c2:
		print('Yes')
	elif a1 <= c1 and a2 >= c1:
		print('Yes')
	elif a1 >= c1 and a2 <= c2:
		print('Yes')
	else:
		print('No')


t = int(input())
for i in range(t):
	(n, a, b, c, d) = map(int, input().split())
	minall = c - d
	maxall = c + d
	minone = a - b
	maxone = a + b
	if minone * n > maxall or maxone * n < minall:
		print('No')
	else:
		print('Yes')


n = int(input())
while n:
	(grain, a, b, c, d) = map(int, input().split(' '))
	min_possible_weight = (a - b) * grain
	max_possible_weight = (a + b) * grain
	min_packet_weight = c - d
	max_packet_weight = c + d
	if max_possible_weight < min_packet_weight or min_possible_weight > max_packet_weight:
		print('No')
	else:
		print('Yes')
	n = n - 1


for _ in range(int(input())):
	(n, a, b, c, d) = map(int, input().split())
	minm = (a - b) * n
	maxm = (a + b) * n
	temp = c - d
	d = c + d
	c = temp
	a = minm
	b = maxm
	if a <= c and b >= c or (a <= d and b >= d) or (a >= c and b <= d):
		print('Yes')
	else:
		print('No')


for _ in range(int(input())):
	(n, a, b, c, d) = map(int, input().split())
	min_grain = (a - b) * n
	max_grain = (a + b) * n
	min_tot = c - d
	max_tot = c + d
	if max_tot >= min_grain and min_tot <= max_grain:
		print('Yes')
	else:
		print('No')


for i in range(int(input())):
	(n, a, b, c, d) = map(int, input().split())
	x = a - b
	p = a + b
	y = c - d
	q = c + d
	if n * x > q or n * p < y:
		print('No')
	else:
		print('Yes')


a = int(input())
b = 0
c = 0
d = 0
e = 0
for i in range(a):
	A = [int(i) for i in input().split()]
	b = (A[1] - A[2]) * A[0]
	c = (A[1] + A[2]) * A[0]
	d = A[3] - A[4]
	e = A[3] + A[4]
	if e >= b >= d:
		print('Yes')
	elif e >= c >= d:
		print('Yes')
	elif b <= d and c >= e:
		print('Yes')
	else:
		print('No')


for _ in range(int(input())):
	(net, a, b, c, d) = map(int, input().split())
	net_max = c + d
	net_min = c - d
	one_max = a + b
	one_min = a - b
	net_list = [x / net for x in range(net_min, net_max + 1)]
	for x in net_list:
		if x >= one_min and x <= one_max:
			print('Yes')
			break
	else:
		print('No')


T = int(input())
while T:
	(n, a, b, c, d) = map(int, input().split())
	minw = a - b
	maxw = a + b
	minpw = c - d
	maxpw = c + d
	if n * minw <= maxpw and n * maxw >= minpw:
		print('Yes')
	else:
		print('No')
	T -= 1


t = int(input())
for _ in range(t):
	(n, a, b, c, d) = map(int, input().split(' '))
	i = a - b
	x = (a - b) * n
	x1 = (a + b) * n
	if x1 >= c - d and x <= c + d:
		print('Yes')
	else:
		print('No')


import sys, bisect
from math import gcd
input = sys.stdin.readline

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

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

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

def invr():
	return map(int, input().rstrip().split())
times = 60
t = inp()
for _ in range(t):
	(n, a, b, c, d) = invr()
	left = max(0, a - b)
	right = a + b
	lans = max(0, c - d)
	rans = c + d
	if left * n > rans:
		print('NO')
	elif right * n < lans:
		print('NO')
	else:
		print('YES')


import math
lower = int(input(''))
for i in range(0, lower):
	inp = list(map(int, input().split()))
	n = inp[0]
	a = inp[1]
	b = inp[2]
	c = inp[3]
	d = inp[4]
	if (a + b) * n < c - d or (a - b) * n > c + d:
		print('No')
	else:
		print('Yes')


t = int(input())
for i in range(t):
	a = list(map(int, input().split()))
	x = a[1] - a[2]
	y = a[1] + a[2]
	p = a[3] - a[4]
	q = a[3] + a[4]
	if a[0] * y < p:
		print('No')
	elif a[0] * x > q:
		print('No')
	else:
		print('Yes')


t = int(input())
for i in range(t):
	yes = True
	myList = input().split()
	(n, a, b, c, d) = (int(myList[0]), int(myList[1]), int(myList[2]), int(myList[3]), int(myList[4]))
	if (a - b) * n > c + d:
		yes = False
	if (a + b) * n < c - d:
		yes = False
	if yes:
		print('Yes')
	else:
		print('No')


t = int(input())
for i in range(t):
	(n, a, b, x, y) = map(int, input().split())
	if (a + b) * n >= x - y and (a + b) * n <= x + y:
		print('Yes')
		continue
	if (a - b) * n >= x - y and (a - b) * n <= x + y:
		print('Yes')
		continue
	if (a + b) * n >= x - y and (a - b) * n <= x + y:
		print('Yes')
		continue
	if (a - b) * n >= x - y and (a + b) * n <= x + y:
		print('Yes')
		continue
	print('No')


t = int(input())
count = 0
ans = []
while count < t:
	(n, a, b, c, d) = input().split()
	flag = 0
	poss_pack = []
	poss_pack.append(int(c) - int(d))
	poss_pack.append(int(c) + int(d))
	poss_grain = []
	poss_grain.append(int(a) - int(b))
	poss_grain.append(int(a) + int(b))
	max_w = poss_grain[1] * int(n)
	min_w = poss_grain[0] * int(n)
	if min_w > poss_pack[1]:
		ans.append('No')
	elif max_w < poss_pack[0]:
		ans.append('No')
	else:
		ans.append('Yes')
	count += 1
for u in ans:
	print(u)


def rice_(n, size):
	val = ((int(i[0]) * (int(i[1]) - int(i[2])), int(i[3]) + int(i[4]), int(i[0]) * (int(i[1]) + int(i[2])), int(i[3]) - int(i[4])) for i in size)
	cond = (i[1] < i[0] or i[2] < i[3] for i in val)
	for i in cond:
		if i:
			print('No')
			continue
		print('Yes')
n = int(input())
size = (input().split(' ') for _ in range(n))
rice_(n, size)


t = int(input())
for i in range(t):
	x = [int(x) for x in input().split()]
	n = x[0]
	ming = x[1] - x[2]
	maxg = x[1] + x[2]
	minp = x[3] - x[4]
	maxp = x[3] + x[4]
	if n * ming > maxp or n * maxg < minp:
		print('No')
	else:
		print('Yes')


t = int(input())
for _ in range(t):
	(n, a, b, c, d) = map(int, input().split())
	x1 = a - b
	x2 = a + b
	y1 = c - d
	y2 = c + d
	val = 0
	for i in range(y1, y2 + 1):
		if i >= n * x1 and i <= n * x2:
			val = 1
			break
	if val == 1:
		print('Yes')
	else:
		print('No')


t = int(input())
while t:
	t -= 1
	(n, a, b, c, d) = map(int, input().split())
	mxwe = (b + a) * n
	mnwe = (a - b) * n
	if mxwe < c - d or mnwe > c + d:
		print('NO')
	else:
		print('Yes')


for _ in range(int(input())):
	(n, a, b, c, d) = [int(i) for i in input().split()]
	ans = 'No'
	for i in range(a - b, a + b + 1):
		if n * i <= c + d and n * i >= c - d:
			ans = 'Yes'
			break
	if ans == 'No':
		if (a - b) * n < c - d and (a + b) * n > c + d:
			ans = 'Yes'
	print(ans)


for _ in range(int(input())):
	(n, a, b, c, d) = map(int, input().split())
	mnlim = c - d
	mxlim = c + d
	mngrain = a - b
	mxgrain = a + b
	print('YES' if mngrain * n <= mxlim and mxgrain * n >= mnlim else 'NO')


from math import gcd, sqrt
t = int(input())
for i in range(t):
	(n, a, b, c, d) = map(int, input().split())
	r = c + d
	q = c - d
	if (a - b) * n > r:
		print('No')
	elif (a + b) * n < q:
		print('No')
	else:
		print('Yes')


t = int(input())
while t:
	t = t - 1
	l1 = list(map(int, input().split()))
	(n, a, b, c, d) = (l1[0], l1[1], l1[2], l1[3], l1[4])
	(e, f, g, h) = (a - b, a + b, c - d, c + d)
	p = e * n
	q = f * n
	if p <= h and g <= q:
		print('Yes')
	else:
		print('No')


for t in range(int(input())):
	(n, a, b, c, d) = map(int, input().split())
	g_mn = a - b
	g_mx = a + b
	p_mn = c - d
	p_mx = c + d
	if n * g_mn > p_mx or n * g_mx < p_mn:
		print('No')
	else:
		print('Yes')


def solve(a, b, c, d, n):
	if (a - b) * n > c + d or (a + b) * n < c - d:
		return 'No'
	return 'Yes'
test_cases = int(input())
for i in range(test_cases):
	(n, a, b, c, d) = [int(a) for a in input().split(' ')]
	print(str(solve(a, b, c, d, n)))


for _ in range(int(input())):
	(grains, a, b, c, d) = map(int, input().split())
	small = a - b
	big = a + b
	spack = c - d
	bpack = c + d
	if small * grains >= spack and small * grains <= bpack:
		print('Yes')
	elif big * grains >= spack and big * grains <= bpack:
		print('Yes')
	elif small * grains <= spack and big * grains >= spack:
		print('Yes')
	elif small * grains <= bpack and big * grains >= bpack:
		print('Yes')
	else:
		print('No')


t = int(input())
for i in range(t):
	(n, a, b, c, d) = map(int, input().strip().split())
	w = n * (a - b)
	if c - d <= w and w <= c + d or (c - d <= n * (a + b) and w <= c + d):
		print('Yes')
	else:
		print('No')


n = int(input())
p = []
for i in range(n):
	p.append(list(map(int, input().split())))
for j in range(n):
	case = p[j]
	rice = [(case[1] - case[2]) * case[0], (case[1] + case[2]) * case[0]]
	package = [case[3] - case[4], case[3] + case[4]]
	if rice[0] >= package[0]:
		if rice[0] <= package[1]:
			print('Yes')
		elif rice[0] >= package[1]:
			print('No')
	elif rice[1] >= package[0]:
		print('Yes')
	else:
		print('No')


cases = int(input())
for j in range(cases):
	b = [int(i) for i in input().split()]
	if b[0] * (b[1] - b[2]) > b[3] + b[4] or b[0] * (b[1] + b[2]) < b[3] - b[4]:
		print('No')
	else:
		print('Yes')


for _ in range(int(input())):
	(counted, a, b, c, d) = [int(x) for x in input().split()]
	add = (a + b) * counted
	sub = (a - b) * counted
	start = c - d
	end = c + d
	if add < start or sub > end:
		print('NO')
	else:
		print('YES')


def read_int():
	return int(input())

def read_ints():
	return map(int, input().split(' '))
t = read_int()
for case_num in range(t):
	(n, a, b, c, d) = read_ints()
	if n * (a + b) >= c - d and n * (a - b) <= c + d:
		print('Yes')
	else:
		print('No')


testcases = int(input())
for i in range(testcases):
	(n, a, b, c, d) = list(map(int, input().split()))
	L = n * (a - b)
	R = n * (a + b)
	if R < c - d or c + d < L:
		print('NO')
	else:
		print('YES')


t = int(input())
for test in range(t):
	(n, a, b, c, d) = map(int, input().split())
	minw = a - b
	maxw = a + b
	mins = c - d
	maxs = c + d
	flag = True
	if minw * n > maxs:
		flag = False
	if maxw * n < mins:
		flag = False
	if flag:
		print('Yes')
	else:
		print('No')


for num in range(int(input())):
	x = [int(n) for n in input().split()]
	n = x[0]
	a = x[1] + x[2]
	b = x[1] - x[2]
	c = x[3] + x[4]
	d = x[3] - x[4]
	if a * n < d or b * n > c:
		print('NO')
	else:
		print('YES')


t = int(input())
for i in range(t):
	(n, a, b, c, d) = map(int, input().split())
	flag = 0
	for i in range(c - d, c + d + 1):
		res = i / n
		if res >= a - b and res <= a + b:
			flag = 1
			print('Yes')
			break
	if flag != 1:
		print('No')


t = int(input())
for i in range(t):
	(n, a, b, c, d) = [int(x) for x in input().split()]
	lb = a - b
	ub = a + b
	if n * ub < c - d or n * lb > c + d:
		print('No')
	else:
		print('Yes')


t = int(input())
data = []
for _ in range(t):
	s = input()
	n = int(s.split(' ')[0])
	a = int(s.split(' ')[1])
	b = int(s.split(' ')[2])
	c = int(s.split(' ')[3])
	d = int(s.split(' ')[4])
	l = [n, a, b, c, d]
	data.append(l)
for l in data:
	min = l[0] * (l[1] - l[2])
	max = l[0] * (l[1] + l[2])
	if min > l[3] + l[4] or max < l[3] - l[4]:
		print('No')
	else:
		print('Yes')


t = int(input())
l = []
for i in range(t):
	A = input().split(' ')
	n = int(A[0])
	a = int(A[1])
	b = int(A[2])
	c = int(A[3])
	d = int(A[4])
	if n * (a - b) >= c - d and n * (a - b) <= c + d or (n * (a + b) <= c + d and n * (a + b) >= c - d) or (n * (a - b) <= c - d and n * (a + b) >= c + d):
		l.append('YES')
	else:
		l.append('NO')
for i in range(len(l)):
	print(l[i])


T = int(input())

def check(left, right, l, r):
	if r < left or l > right:
		print('No')
	else:
		count = 0
		for j in range(l, r + 1):
			if left <= j and j <= right:
				print('Yes')
				count = 1
				break
		if count == 0:
			print('No')
for i in range(T):
	(n, a, b, c, d) = map(int, input().split())
	left = c - d
	right = c + d
	l = (a - b) * n
	r = (a + b) * n
	check(left, right, l, r)


for _ in range(int(input())):
	(n, a, b, c, d) = map(int, input().split())
	arr = [a - b] * n
	i = 0
	while i != n + 1:
		diff = c - d - sum(arr)
		if i == n:
			if sum(arr) > c + d or sum(arr) < c - d:
				print('No')
				break
		if sum(arr) > c + d:
			print('No')
			break
		elif sum(arr) <= c + d and sum(arr) >= c - d:
			print('Yes')
			break
		elif arr[i] + diff <= a + b:
			arr[i] += diff
		else:
			arr[i] = a + b
		i += 1


_count = int(input())
for tr in range(_count):
	array = input().split()
	n = int(array[0])
	a = int(array[1])
	b = int(array[2])
	c = int(array[3])
	d = int(array[4])
	minW = (a - b) * n
	maxW = (a + b) * n
	mnS = c - d
	mxS = c + d
	if mnS <= minW <= mxS or mnS <= maxW <= mxS or minW <= mnS <= maxW or (minW <= mxS <= maxW):
		print('Yes')
	else:
		print('No')


t = int(input())
for i in range(t):
	l = str.split(input(), ' ')
	n = int(l[0])
	a = int(l[1])
	b = int(l[2])
	c = int(l[3])
	d = int(l[4])
	check = 0
	if (a + b) * n < c - d:
		check = 1
	elif (a - b) * n > c + d:
		check = 1
	if check == 1:
		print('NO')
	else:
		print('YES')


try:
	t = int(input())
	for _ in range(t):
		(n, a, b, c, d) = map(int, input().split())
		a1 = abs(a - b)
		a1 = abs(a - b)
		a2 = abs(a + b)
		b1 = abs(c - d)
		b2 = abs(c + d)
		if n * a2 < b1 or n * a1 > b2:
			print('NO')
		else:
			print('YES')
except:
	pass


t = int(input())
for i in range(t):
	(total, a, b, c, d) = map(int, input().split())
	l = (a - b) * total
	m = (a + b) * total
	if l > c + d:
		print('NO')
	elif m < c - d:
		print('NO')
	else:
		print('YES')


testcases = int(input())
for t in range(testcases):
	(n, a, b, c, d) = [int(x) for x in input().split()]
	ra = (a - b) * n
	rb = (a + b) * n
	fa = c - d
	fb = c + d
	if ra > fb or rb < fa:
		print('No')
	else:
		print('Yes')


t = int(input())
for i in range(t):
	inputList = list(map(int, input().split()))
	n = inputList[0]
	a = inputList[1]
	b = inputList[2]
	c = inputList[3]
	d = inputList[4]
	gex = n * (a + b)
	gle = n * (a - b)
	nex = c + d
	nle = c - d
	if gle in range(nle, nex + 1):
		print('Yes')
	elif gex in range(nle, nex + 1):
		print('Yes')
	elif gle <= nle and gex >= nex:
		print('Yes')
	else:
		print('No')


for _ in range(int(input())):
	m = list(map(int, input().split()))
	a = m[1]
	b = m[2]
	c = m[3]
	d = m[4]
	l = (a - b) * m[0]
	u = (a + b) * m[0]
	l1 = c - d
	u1 = c + d
	if l >= l1 and l <= u1 or (u >= l1 and u <= u1) or (l1 >= l and l1 <= u) or (u1 >= l and u1 <= u):
		print('Yes')
	else:
		print('No')


t = int(input())
for i in range(t):
	(n, a, b, c, d) = list(map(int, input().split()))
	gran_lower = a - b
	gran_high = a + b
	total_lower = c - d
	total_higher = c + d
	if n * gran_lower > total_higher or n * gran_high < total_lower:
		print('No')
	else:
		print('Yes')


def num_of_intersect_two_lines(line_1, line_2):
	return min(line_1[1], line_2[1]) - max(line_1[0], line_2[0]) + 1
for _ in range(int(input())):
	(n, a, b, c, d) = map(int, input().split())
	line_1 = ((a - b) * n, (a + b) * n)
	line_2 = (c - d, c + d)
	if num_of_intersect_two_lines(line_1, line_2) > 0:
		print('Yes')
	else:
		print('No')


query = int(input())
for _ in range(query):
	(n, a, b, c, d) = map(int, input().split())
	a0 = abs(a - b)
	b0 = a + b
	c0 = abs(c - d)
	d0 = c + d
	if n * a0 < c0:
		if n * b0 < c0:
			print('No')
		else:
			print('Yes')
	elif n * a0 <= d0:
		print('Yes')
	else:
		print('No')


for _ in range(int(input())):
	(n, a, b, c, d) = map(int, input().split())
	(mi, mx) = ((a - b) * n, (a + b) * n)
	(li, lm) = (c + d, c - d)
	if mi > li or mx < lm:
		print('No')
	else:
		print('Yes')


t = int(input())
f = 0
while f < t:
	f = f + 1
	(n1, a1, b1, c1, d1) = input().split()
	n = int(n1)
	a = int(a1)
	b = int(b1)
	c = int(c1)
	d = int(d1)
	p = a - b
	q = a + b
	r = c + d
	s = c - d
	h = s
	while h <= r:
		if h <= q * n and h >= p * n:
			print('Yes')
			h = r + 3
			continue
		h = h + 1
	if h == r + 3:
		continue
	print('No')


from bisect import bisect_left as bl, bisect_right as br, insort
import sys
import heapq
from math import *
from collections import defaultdict as dd, deque

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

def mdata():
	return map(int, data().split())
out = sys.stdout.write
for i in range(int(data())):
	(n, a, b, c, d) = mdata()
	if n * (a + b) >= c - d and n * (a - b) <= c + d:
		print('YES')
	else:
		print('NO')


t = int(input())
for _ in range(t):
	(n, a, b, c, d) = map(int, input().strip().split())
	l = a - b
	r = a + b
	l_p = l * n
	r_p = r * n
	lim_l = c - d
	lim_r = c + d
	ans = 'YES'
	if r_p < lim_l or l_p > lim_r:
		ans = 'NO'
	print(ans)


res = []
t = int(input())
for i in range(t):
	(n, a, b, c, d) = [int(x) for x in input().split()]
	res.append((n, a, b, c, d))
for i in range(t):
	n = res[i][0]
	a = res[i][1]
	b = res[i][2]
	c = res[i][3]
	d = res[i][4]
	if n * (a - b) > c + d:
		print('No')
	elif n * (a + b) < c - d:
		print('No')
	else:
		print('Yes')


import sys
input = sys.stdin.read()
data = list(map(int, input.split()))
T = int(data[0])
it = 1
while T > 0:
	n = data[it]
	a = data[it + 1]
	b = data[it + 2]
	c = data[it + 3]
	d = data[it + 4]
	mini = c - d
	maxi = c + d
	min_rice = mini / n if n != 0 else 0
	max_rice = maxi / n if n != 0 else 0
	if max_rice < a - b or min_rice > a + b:
		print('No')
	else:
		print('Yes')
	it += 5
	T -= 1


arr = [[], []]

def out1(x, n, m):
	if x <= 0:
		return True
	if n <= 0:
		if x - 10 * m > 0:
			return False
		else:
			return True
	if m <= 0:
		return False
	return out1(x // 2 + 10, n - 1, m) or out1(x - 10, n, m - 1)

def out():
	(n, a, b, c, d) = map(int, input().split())
	if c - d > n * (a + b) or n * (a - b) > c + d:
		return 'No'
	return 'Yes'
for i in range(int(input())):
	print(out())


import sys, inspect
ints = (int(x) for x in sys.stdin.read().split())
ntc = next(ints)
for tc in range(1, ntc + 1):
	(n, a, b, c, d) = (next(ints) for _ in range(5))
	print('Yes' if n * (a - b) <= c + d and c - d <= n * (a + b) else 'No')


from sys import stdin, stdout
import heapq as hq
from collections import defaultdict
t = int(input())
for tc in range(t):
	(n, a, b, c, d) = map(int, stdin.readline().split())
	res = 'No'
	if c - d <= (a - b) * n <= c + d or c - d <= (a + b) * n <= c + d:
		res = 'Yes'
	elif (a - b) * n <= c - d and (a + b) * n >= c + d:
		res = 'Yes'
	stdout.write(str(res) + '\n')


t = int(input())
for _ in range(t):
	(n, a, b, c, d) = map(int, input().split())
	maxt = c + d
	mint = c - d
	if (a - b) * n > maxt:
		print('NO')
	elif (a + b) * n < mint:
		print('NO')
	else:
		print('YES')


t = int(input())
for tt in range(t):
	(n, a, b, c, d) = (int(i) for i in input().split())
	cdb = n * (a - b) <= c - d <= n * (a + b) or n * (a - b) <= c + d <= n * (a + b)
	abb = c - d <= n * (a - b) <= c + d or c - d <= n * (a + b) <= c + d
	print('YES' if cdb or abb else 'NO')


import sys
import heapq
import math
import bisect

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

def iinput():
	return int(input())

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

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

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

def main():
	(n, a, b, c, d) = rinput()
	if max(c - d, n * (a - b)) <= min(d + c, n * (a + b)):
		print('YES')
		return
	print('NO')
for i in range(iinput()):
	main()


import sys
from itertools import islice
stdin = sys.stdin
t = int(stdin.readline())
for line in stdin:
	if not line:
		break
	(n, a, b, c, d) = list(map(int, line.split()))
	if n * (a - b) <= c + d and n * (a + b) >= c - d:
		print('Yes')
	else:
		print('No')


test_case = int(input())
for _ in range(test_case):
	(n, a, b, c, d) = map(int, input().split())
	r1 = [(a - b) * n, (a + b) * n]
	r2 = [c - d, c + d]
	if r1[0] > r2[1] or r1[1] < r2[0]:
		print('NO')
	else:
		print('YES')


t = int(input())
A = []
for i in range(0, t):
	(n, a, b, c, d) = map(int, input().split())
	L = n * (a - b)
	R = n * (a + b)
	if L > c + d or R < c - d:
		A.append('NO')
	else:
		A.append('YES')
for j in range(0, t):
	print(A[j])


t = int(input())
while t > 0:
	t -= 1
	(n, a, b, c, d) = map(int, input().split())
	left = (a - b) * n
	right = (a + b) * n
	if left < c - d and right < c - d:
		print('NO')
	elif left > c + d and right > c + d:
		print('NO')
	else:
		print('YES')


tests = int(input())
while tests > 0:
	(grains, a, b, c, d) = [int(i) for i in input().split(' ')]
	minGrainW = (a - b) * grains
	maxGrainW = (a + b) * grains
	minPackW = c - d
	maxPackW = c + d
	if minGrainW <= minPackW <= maxGrainW or minGrainW <= maxPackW <= maxGrainW or minPackW <= minGrainW <= maxPackW or (minPackW <= maxGrainW <= maxPackW):
		print('Yes')
	else:
		print('No')
	tests = tests - 1


for z in range(int(input())):
	l = list(map(int, input().strip().split(' ')))
	al = l[0] * (l[1] - l[2])
	ah = l[0] * (l[1] + l[2])
	cl = l[3] - l[4]
	ch = l[3] + l[4]
	f = 0
	for i in range(cl, ch + 1):
		if al <= i and i <= ah:
			f = 1
			break
	if f == 1:
		print('Yes')
	else:
		print('No')


n = int(input())
for _ in range(n):
	(n, a, b, c, d) = list(map(int, input().split()))
	if a - b == 0:
		fine = (c - d) / (a + b) <= n
	else:
		fine = (c - d) / (a + b) <= n <= (c + d) / (a - b)
	if fine:
		print('Yes')
	else:
		print('No')


t = int(input())
for tt in range(t):
	(n, a, b, c, d) = map(int, input().split())
	r1 = a - b
	r2 = a + b
	t1 = c - d
	t2 = c + d
	if r1 * n > t2 or r2 * n < t1:
		print('No')
	else:
		print('Yes')


def main():
	t = int(input())
	for __ in range(t):
		(n, a, b, c, d) = map(int, input().split())
		C = c - d
		D = c + d
		if C <= n * (a - b) <= D or C <= n * (a + b) <= D:
			print('Yes')
		elif C > n * (a - b):
			diff = C - n * (a - b)
			if diff % n == 0 and a - b + diff // n <= a + b:
				print('Yes')
			elif diff % n != 0 and a - b + diff // n + 1 <= a + b:
				print('Yes')
			else:
				print('No')
		elif n * (a + b) > D:
			diff = n * (a + b) - D
			if diff % n == 0 and a + b - diff // n >= a - b:
				print('Yes')
			elif diff % n != 0 and a + b - diff // n - 1 >= a - b:
				print('Yes')
			else:
				print('No')
		else:
			print('No')
main()


t = int(input())
for i in range(t):
	(n, a, b, c, d) = map(int, input().split(' '))
	maxg = (a + b) * n
	ming = abs(a - b) * n
	maxa = c + d
	mina = abs(c - d)
	if ming <= maxa and mina <= maxg:
		print('Yes')
	else:
		print('No')


for i in range(int(input().strip())):
	(n, a, b, c, d) = map(int, input().split())
	min = c - d
	max = c + d
	absmin = n * (a - b)
	absmax = n * (a + b)
	if min <= absmin <= max or min <= absmax <= max or (absmin <= min and max <= absmax):
		print('YES')
	else:
		print('NO')


import sys

class ANastyaAndRice:

	def solve(self, tc=0):
		for _ in range(int(input())):
			(n, a, b, c, d) = [int(_) for _ in input().split()]
			if n * (a - b) > c + d or n * (a + b) < c - d:
				print('No')
			else:
				print('Yes')
solver = ANastyaAndRice()
input = sys.stdin.readline
solver.solve()


for _ in range(int(input())):
	(n, a, b, c, d) = [int(x) for x in input().split()]
	if (a - b) * n <= c + d and (a + b) * n >= c - d:
		print('YES')
	else:
		print('NO')


a = int(input())
h = []
for i in range(0, a):
	(n, a, b, c, d) = list(map(int, input().split()))
	L = n * (a - b)
	R = n * (a + b)
	if R < c - d or c + d < L:
		h.append('No')
	else:
		h.append('Yes')
print(*h, sep='\n')


t = int(input())
for _t in range(t):
	(n, a, b, c, d) = map(int, input().split())
	(A, B) = (n * (a - b), n * (a + b))
	(C, D) = (c - d, c + d)
	if A > D or B < C:
		print('No')
	else:
		print('Yes')


for i in range(int(input())):
	(n, a, b, c, d) = map(int, input().split())
	x = (a - b) * n
	y = (a + b) * n
	q = c - d
	w = c + d
	k = 0
	if x in range(q, w + 1) or y in range(q, w + 1) or q in range(x, y + 1) or (w in range(x, y + 1)):
		print('Yes')
	else:
		print('No')


t = int(input())
for i in range(t):
	numbers = input().split()
	for i in range(5):
		numbers[i] = int(numbers[i])
	n = numbers[0]
	(a, b, c, d) = (numbers[1], numbers[2], numbers[3], numbers[4])
	if abs(n * a - c) <= n * b + d:
		print('Yes')
	else:
		print('No')


t = int(input())
for i in range(t):
	(n, a, b, c, d) = input().split()
	n = int(n)
	a = int(a)
	b = int(b)
	c = int(c)
	d = int(d)
	high = c + d
	low = c - d
	minimum = n * (a - b)
	maximum = n * (a + b)
	if maximum < low or high < minimum:
		print('No')
	else:
		print('yes')


for t in range(int(input())):
	(n, a, b, c, d) = list(map(int, input().split()))
	min_weight = n * (a - b)
	max_weight = n * (a + b)
	package_min = c - d
	package_max = c + d
	if package_min <= min_weight and min_weight <= package_max or (package_min <= max_weight and max_weight <= package_max) or (min_weight <= package_min and max_weight >= package_max):
		print('YES')
	else:
		print('NO')


t = int(input())
grains = []
for i in range(t):
	grains.append(input().split())
for i in range(t):
	n = int(grains[i][0])
	a = int(grains[i][1])
	b = int(grains[i][2])
	c = int(grains[i][3])
	d = int(grains[i][4])
	if (a + b) * n >= c - d and (a - b) * n <= c + d:
		print('Yes')
	else:
		print('No')


import os
import sys
from io import BytesIO, IOBase
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')
from itertools import permutations as pmt
from collections import Counter
from collections import deque
for i in range(int(input())):
	(n, a, b, c, d) = input().split()
	n = int(n)
	a = int(a)
	b = int(b)
	c = int(c)
	d = int(d)
	mi = (a - b) * n
	ma = (a + b) * n
	mip = c - d
	map = c + d
	if mi < mip and ma < mip or mi > map:
		print('NO')
	elif map < mip:
		print('NO')
	else:
		print('YES')


import sys
t = int(input())
for _ in range(t):
	(n, a, b, c, d) = map(int, input().split())
	minw = n * (a - b)
	maxw = n * (a + b)
	mint = c - d
	maxt = c + d
	if minw <= mint and maxw >= maxt:
		print('Yes')
	elif mint <= minw <= maxt:
		print('Yes')
	elif mint <= maxw <= maxt:
		print('Yes')
	else:
		print('No')


import sys
input = sys.stdin.buffer.readline
T = int(input())
for testcase in range(T):
	(n, a, b, c, d) = map(int, input().split())
	mi = (a - b) * n
	ma = (a + b) * n
	p = c - d
	q = c + d
	if mi <= p <= ma or mi <= q <= ma or p <= mi <= q or (p <= ma <= q):
		print('Yes')
	else:
		print('No')


t = int(input())
for T in range(t):
	(n, a, b, c, d) = list(map(lambda x: int(x), input().split()))
	if n * (a - b) >= c - d and n * (a - b) <= c + d:
		print('Yes')
	elif n * (a - b) >= c + d:
		print('No')
	elif n * (a - b) <= c - d:
		if n * (a + b) >= c - d:
			print('Yes')
		else:
			print('No')


def ans(n, a, b, c, d):
	if n * (a - b) <= c + d and n * (a + b) >= c - d:
		return 'Yes'
	return 'No'
n = int(input())
for i in range(n):
	q = input().split()
	m = int(q[0])
	a = int(q[1])
	b = int(q[2])
	c = int(q[3])
	d = int(q[4])
	print(ans(m, a, b, c, d))


import sys
import math

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

def idata():
	return [int(x) for x in ii().split()]

def bfs(graph, start_ver):
	visited = set()
	queue = [[start_ver, 0]]
	visited.add(start_ver)
	(ans_way_length, ans_ver) = (0, 1)
	while queue:
		ver = queue[0]
		queue = queue[1:]
		for new_ver in graph[ver[0]]:
			if new_ver not in visited:
				visited.add(new_ver)
				queue += [[new_ver, ver[1] + 1]]
				if ans_way_length < ver[1] + 1:
					(ans_ver, ans_way_length) = (new_ver, ver[1] + 1)
	return (ans_ver, ans_way_length)

def dfs(graph, ver):
	used_v = set()
	depth = [0] * (len(graph) + 1)
	level = [ver]
	num_of_level = 0
	while level:
		new_level = []
		for v in level:
			depth[v] = num_of_level
			used_v.add(v)
			for v1 in graph[v]:
				if v1 not in used_v:
					new_level += [v1]
		level = new_level
		num_of_level += 1
	return depth

def binary_search(array, x):
	(left, right) = (-1, len(array))
	while left + 1 != right:
		middle = (left + right) // 2
		if array[middle] >= x:
			right = middle
		elif array[middle] < x:
			left = middle
	return right

def c_mod(n1, k1, mod1):
	num = den = 1
	for i in range(n1 - k1):
		num = num * (n1 - i) % mod1
		den = den * (i + 1) % mod1
	return num * pow(den, mod1 - 2, mod1) % mod1

def c(n1, k1):
	num = den = 1
	for i in range(n1 - k1):
		num = num * (n1 - i)
		den = den * (i + 1)
	return num // den

def v_sistemu(x, k):
	x = int(x)
	z = ''
	while x:
		z += str(x % k)
		x //= k
	return z[::-1]

def iz_sistemi(x, k):
	x = str(x)[::-1]
	ans = 0
	for i in range(len(x)):
		ans += int(x[i]) * pow(k, i)
	return ans

def solve_of_problem():
	(n, a, b, c, d) = idata()
	if n * (a + b) < c - d or (a - b) * n > c + d:
		print('NO')
	else:
		print('YES')
	return
for ______ in range(int(ii())):
	solve_of_problem()


for _ in range(int(input())):
	(n, a, b, c, d) = map(int, input().split())
	x = a - b
	y = a + b
	x = x * n
	y = y * n
	p = c - d
	q = c + d
	if x <= q and y >= p:
		print('YES')
	else:
		print('NO')


for _ in range(int(input())):
	(n, a, b, c, d) = [int(i) for i in input().split()]
	if (a + b) * n < c - d:
		print('NO')
	elif (a - b) * n <= c + d:
		print('YES')
	else:
		print('NO')


y = int(input())
for i in range(y):
	al = input().split()
	m = list(map(int, al))
	z = m[3] - m[4]
	x = m[3] + m[4]
	a = (m[1] - m[2]) * m[0]
	b = (m[1] + m[2]) * m[0]
	if z <= a and a <= x:
		print('Yes')
	elif z <= b and b <= x:
		print('Yes')
	elif a <= z and x <= b:
		print('Yes')
	else:
		print('No')


t = int(input())
for i in range(t):
	(n, a, b, c, d) = map(int, input().split())
	in_range_st = (a - b) * n
	in_range_end = (a + b) * n
	out_range_st = c - d
	out_range_end = c + d
	if in_range_st > out_range_end or in_range_end < out_range_st:
		print('No')
	else:
		print('Yes')


for _ in range(int(input())):
	(n, a, b, c, d) = list(map(int, input().split()))
	up = (a + b) * n
	do = (a - b) * n
	up2 = c + d
	do2 = c - d
	temp = 0
	if up < do2 or do > up2:
		print('No')
	else:
		print('Yes')


from math import ceil
for _ in range(int(input())):
	(n, a, b, c, d) = map(int, input().split())
	flag = 0
	if (a - b) * n <= c - d:
		x = c - d - (a - b) * n
		val = a - b + x // n
		if a + b - val >= ceil(x % n / n):
			flag = 1
			print('Yes')
	elif (a + b) * n >= c + d:
		x = (a + b) * n - (c + d)
		val = a + b - x // n
		if val - (a - b) >= ceil(x % n / n):
			flag = 1
			print('Yes')
	else:
		flag = 1
		print('Yes')
	if flag == 0:
		print('No')


t = int(input())
for i in range(t):
	(n, a, b, c, d) = map(int, input().strip().split(' '))
	flag = 0
	ma = (a + b) * n
	mi = (a - b) * n
	if mi >= c - d and mi <= c + d or (ma >= c - d and ma <= c + d) or (mi <= c - d and ma >= c + d):
		print('Yes')
	else:
		print('No')


import sys
from math import log2, floor, ceil, sqrt
Ri = lambda : [int(x) for x in sys.stdin.readline().split()]
ri = lambda : sys.stdin.readline().strip()

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

def list2d(a, b, c):
	return [[c] * b for i in range(a)]

def list3d(a, b, c, d):
	return [[[d] * c for j in range(b)] for i in range(a)]

def list4d(a, b, c, d, e):
	return [[[[e] * d for j in range(c)] for j in range(b)] for i in range(a)]

def ceil(x, y=1):
	return int(-(-x // y))

def INT():
	return int(input())

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

def LIST(N=None):
	return list(MAP()) if N is None else [INT() for i in range(N)]

def Yes():
	print('Yes')

def No():
	print('No')

def YES():
	print('YES')

def NO():
	print('NO')
INF = 10 ** 18
MOD = 10 ** 9 + 7
for _ in range(int(ri())):
	(n, a, b, c, d) = Ri()
	l = a - b
	r = a + b
	tl = c - d
	tr = c + d
	l = n * l
	r = n * r
	if max(l, tl) <= min(r, tr):
		Yes()
	else:
		No()


t = int(input())
while t:
	inp = input()
	inp = inp.split()
	n = int(inp[0])
	a = int(inp[1])
	b = int(inp[2])
	c = int(inp[3])
	d = int(inp[4])
	grain_l = (a - b) * n
	grain_u = (a + b) * n
	t_l = c - d
	t_u = c + d
	if grain_u < t_l or grain_l > t_u:
		print('No')
	else:
		print('Yes')
	t -= 1


def solve(n, a, b, c, d):
	g_min = a - b
	g_max = a + b
	b_min = c - d
	b_max = c + d
	r_min = g_min * n
	r_max = g_max * n
	if r_min >= b_min and r_min <= b_max:
		print('Yes')
	elif r_max >= b_min and r_max <= b_max:
		print('Yes')
	elif r_min < b_min and r_max > b_max:
		print('Yes')
	else:
		print('No')
n = int(input())
for t in range(n):
	(n, a, b, c, d) = list(map(int, input().strip().split()))
	solve(n, a, b, c, d)


t = int(input())
for _ in range(t):
	(n, a, b, c, d) = map(int, input().split())
	max_weight = c + d
	min_weight = c - d
	max_g = a + b
	min_g = a - b
	if max_g * n < min_weight or min_g * n > max_weight:
		print('No')
	else:
		print('Yes')


t = int(input())
while t > 0:
	t -= 1
	(n, a, b, c, d) = list(map(int, input().split()))
	mi1 = n * (a - b)
	ma1 = n * (a + b)
	mi2 = c - d
	ma2 = c + d
	if ma1 > ma2:
		if ma2 >= mi1:
			print('YES')
			continue
		else:
			print('NO')
			continue
	elif ma1 >= mi2:
		print('YES')
		continue
	else:
		print('NO')


t = int(input())
for i in range(t):
	nabcd = list(map(int, input().split()))
	n = nabcd[0]
	a = nabcd[1]
	b = nabcd[2]
	c = nabcd[3]
	d = nabcd[4]
	s = 0
	z = n * (a - b)
	y = n * (a + b)
	w = c - d
	q = c + d
	if z <= w <= y or z <= q <= y:
		print('YES')
	elif w <= z <= q or w <= y <= q:
		print('YES')
	else:
		print('NO')


t = int(input())
while t != 0:
	(n, a, b, c, d) = map(int, input().split())
	dif = a - b
	add = a + b
	dif1 = c - d
	add1 = c + d
	weigh = n * (a - b)
	weigh1 = n * (a + b)
	if weigh > add1 or weigh1 < dif1:
		print('NO')
	else:
		print('YES')
	t -= 1


t = int(input())
for i in range(0, t):
	(n, a, b, c, d) = map(int, input().split())
	grainmin = n * (a - b)
	grainmax = n * (a + b)
	if grainmax < c - d or grainmin > c + d:
		print('No')
	else:
		print('Yes')


n = int(input())
inputs = [list(map(int, input().split())) for _ in range(n)]

def test_weight(n, a, b, c, d):
	grains_max = (a + b) * n
	grains_min = (a - b) * n
	package_max = c + d
	package_min = c - d
	if package_min <= grains_min <= package_max:
		print('Yes')
	elif package_min <= grains_max <= package_max:
		print('Yes')
	elif grains_min < package_min and grains_max > package_max:
		print('Yes')
	else:
		print('No')
for i in inputs:
	test_weight(i[0], i[1], i[2], i[3], i[4])


t = int(input())
for _ in range(t):
	(n, a, b, c, d) = map(int, input().split())
	x = c - d
	y = c + d + 1
	var1 = (a - b) * n
	var2 = (a + b) * n
	if var1 in range(x, y):
		print('Yes')
	elif var2 in range(x, y):
		print('Yes')
	elif var1 < x and var2 > y - 1:
		print('Yes')
	else:
		print('No')


t = int(input())
for tc in range(t):
	s = input().split()
	(n, a, b, c, d) = (int(s[0]), int(s[1]), int(s[2]), int(s[3]), int(s[4]))
	l = (a - b) * n
	r = (a + b) * n
	rc = c + d
	lc = c - d
	z = r - l
	if r < lc:
		print('NO')
	elif l > rc:
		print('NO')
	else:
		if l < lc:
			z = r - lc
		f = 0
		for i in range(z + 1):
			ca = lc + i
			if lc <= ca and ca <= rc:
				print('YES')
				f = 1
				break
		if f == 0:
			print('NO')


for t in range(int(input())):
	(n, a, b, c, d) = map(int, input().split())
	r1 = (n * (a - b), n * (a + b))
	r2 = (c - d, c + d)
	if min(r1[1], r2[1]) >= max(r2[0], r1[0]):
		print('Yes')
	else:
		print('No')


t = int(input())
for i in range(t):
	l = input().split()
	for i in range(5):
		l[i] = int(l[i])
	a = l[0] * (l[1] + l[2]) >= l[3] - l[4]
	b = l[0] * (l[1] - l[2]) <= l[3] + l[4]
	if a and b:
		print('YES')
	else:
		print('NO')


for _ in range(int(input())):
	(n, a, b, c, d) = map(int, input().split())
	left = a - b
	right = a + b
	mini = c - d
	maxi = c + d
	if n * right < mini or n * left > maxi:
		print('NO')
	else:
		print('YES')


import math, sys
import heapq
from collections import Counter, defaultdict

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

def ls():
	return list(map(int, list(input())))

def la():
	return list(input())

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

def dic(x):
	return defaultdict(lambda : x)

def isPrime(n):
	i = 2
	if n == 1:
		return False
	while i <= int(math.sqrt(n)):
		if n % i == 0:
			return False
		i = i + 1
	return True

def gcd(a, b):
	if b == 0:
		return a
	return gcd(b, a % b)

def binarySearch(arr, x):
	(l, r) = (0, len(arr) - 1)
	while l <= r:
		mid = l + (r - l) // 2
		if arr[mid] == x:
			return True
		elif arr[mid] < x:
			l = mid + 1
		else:
			r = mid - 1
	return False
t = ii()
for _ in range(t):
	(n, a, b, c, d) = li()
	flag = 0
	if c + d < (a - b) * n or c - d > (a + b) * n:
		print('No')
	else:
		print('Yes')


for q in range(int(input())):
	(n, a, b, c, d) = map(int, input().split())
	l = a - b
	r = a + b
	L = c - d
	R = c + d
	tmp = l * n
	if tmp > R:
		print('No')
	elif tmp >= L:
		print('Yes')
	else:
		yy = L - tmp
		su = (r - l) * n
		res = 'No'
		for i in range(1, su + 1):
			if L <= tmp + i <= R:
				res = 'Yes'
				break
		print(res)


from sys import stdin, stdout
from itertools import combinations
from collections import defaultdict
import math

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

def stringListIn():
	return [x for x in stdin.readline().split()]

def intIn():
	return int(stdin.readline())

def stringIn():
	return stdin.readline().strip()
t = int(input())
while t > 0:
	t -= 1
	(n, a, b, c, d) = listIn()
	(minn, maxx) = ((a - b) * n, (a + b) * n)
	(tw_min, tw_max) = (c - d, c + d)
	if (minn >= tw_min or maxx >= tw_min) and (minn <= tw_max or maxx <= tw_max):
		print('Yes')
	else:
		print('No')


for _ in range(int(input())):
	(n, a, b, c, d) = map(int, input().split())
	v = (a + b) * n
	q = (a - b) * n
	e = c + d
	j = c - d
	if q > e or v < j:
		print('No')
	else:
		print('Yes')


t = int(input())
for _ in range(t):
	(n, a, b, c, d) = list(map(int, input().split()))
	e = c - d
	f = c + d
	if max(n * (a - b), e) <= min(n * (a + b), f):
		print('Yes')
	else:
		print('No')


def read_int():
	n = int(input())
	return n

def read_ints():
	ints = [int(x) for x in input().split(' ')]
	return ints

def solve(n, a, b, c, d):
	gmin = a - b
	gmax = a + b
	wmin = c - d
	wmax = c + d
	if gmax * n < wmin or gmin * n > wmax:
		return False
	else:
		return True
t = read_int()
for case in range(t):
	(n, a, b, c, d) = read_ints()
	sol = solve(n, a, b, c, d)
	if sol:
		print('Yes')
	else:
		print('No')


t = int(input())
for i in range(t):
	(n, a, b, c, d) = map(int, input().split())
	y = (a - b) * n
	z = (a + b) * n
	x = c - d
	w = c + d
	if y < x and z < x:
		print('No')
	elif y > w and z > x:
		print('No')
	else:
		print('Yes')


def solve():
	(n, a, b, c, d) = map(int, input().split())
	gl = (a - b) * n
	gu = (a + b) * n
	pl = c - d
	pu = c + d
	if max(gl, pl) <= min(gu, pu):
		print('YES')
	else:
		print('NO')
t = int(input())
for x in range(t):
	solve()


import sys
input = sys.stdin.buffer.readline
from collections import defaultdict
con = 10 ** 9 + 7

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

def main():
	T = int(input())
	for i in range(T):
		(n, a, b, c, d) = getlist()
		if n * (a + b) < c - d or n * (a - b) > c + d:
			print('No')
		else:
			print('Yes')
main()


def overlapping_search(p1, p2, p3, p4, p5):
	gate_open = False
	if (p2 + p3) * p1 - (p4 - p5) >= 0 and p4 - p5 - (p2 - p3) * p1 >= 0 or ((p2 + p3) * p1 - (p4 + p5) >= 0 and p4 + p5 - (p2 - p3) * p1 >= 0):
		gate_open = True
	elif p4 + p5 - (p2 - p3) * p1 >= 0 and p4 - p5 - (p2 - p3) * p1 <= 0 or (p4 + p5 - (p2 + p3) * p1 >= 0 and p4 - p5 - (p2 + p3) * p1 <= 0):
		gate_open = True
	return gate_open
testcase = int(input())
answer = []
while testcase != 0:
	nabcd = input()
	nabcd = nabcd.split()
	n = int(nabcd[0])
	a = int(nabcd[1])
	b = int(nabcd[2])
	c = int(nabcd[3])
	d = int(nabcd[4])
	if overlapping_search(n, a, b, c, d):
		answer.append('Yes')
	else:
		answer.append('No')
	testcase -= 1
for i in answer:
	print(i)


for _ in range(int(input())):
	(n, a, b, c, d) = map(int, input().split())
	d1 = a - b
	d2 = a + b
	e1 = c - d
	e2 = c + d
	ans = 1
	mi = n * d1
	ma = n * d2
	if mi < e1 and ma < e1:
		ans = 0
	if mi > e2 and ma > e2:
		ans = 0
	if ans == 0:
		print('No')
	else:
		print('Yes')


for ct in range(int(input())):
	(n, a, b, c, d) = map(int, input().split())
	soma = (a - b) * n
	for i in range(n):
		if c - d <= soma and soma <= c + d:
			print('Yes')
			break
		elif soma > c + d:
			print('No')
			break
		elif c + d - soma < 2 * b:
			soma += c + d - soma
		else:
			soma += 2 * b
	else:
		if c - d <= soma and soma <= c + d:
			print('Yes')
		else:
			print('No')


from sys import stdin
for j in range(int(stdin.readline())):
	[n, a, b, c, d] = [int(x) for x in stdin.readline().split()]
	if n * (a - b) > c + d or n * (a + b) < c - d:
		print('No')
	else:
		print('Yes')


t = int(input())
for tt in range(t):
	(n, a, b, c, d) = [int(i) for i in str.split(input(), ' ')]
	each = (a - b, a + b)
	total = (c - d, c + d)
	tot = (each[0] * n, each[1] * n)
	if tot[0] >= total[0] and tot[0] <= total[1]:
		print('Yes')
	elif tot[1] >= total[0] and tot[1] <= total[1]:
		print('Yes')
	elif tot[0] <= total[0] and tot[1] >= total[1]:
		print('Yes')
	else:
		print('No')


import sys
import math
import os
import itertools
import string
import heapq
import _collections
from collections import Counter
from collections import defaultdict
from functools import lru_cache
import bisect
import re
import queue
from decimal import *

class Scanner:

	@staticmethod
	def int():
		return int(sys.stdin.readline().rstrip())

	@staticmethod
	def string():
		return sys.stdin.readline().rstrip()

	@staticmethod
	def map_int():
		return [int(x) for x in Scanner.string().split()]

	@staticmethod
	def string_list(n):
		return [Scanner.string() for i in range(n)]

	@staticmethod
	def int_list_list(n):
		return [Scanner.map_int() for i in range(n)]

	@staticmethod
	def int_cols_list(n):
		return [Scanner.int() for i in range(n)]

class Math:

	@staticmethod
	def gcd(a, b):
		if b == 0:
			return a
		return Math.gcd(b, a % b)

	@staticmethod
	def lcm(a, b):
		return a * b // Math.gcd(a, b)

	@staticmethod
	def divisor(n):
		res = []
		i = 1
		for i in range(1, int(n ** 0.5) + 1):
			if n % i == 0:
				res.append(i)
				if i != n // i:
					res.append(n // i)
		return res

	@staticmethod
	def round_up(a, b):
		return -(-a // b)

	@staticmethod
	def is_prime(n):
		if n < 2:
			return False
		if n == 2:
			return True
		if n % 2 == 0:
			return False
		d = int(n ** 0.5) + 1
		for i in range(3, d + 1, 2):
			if n % i == 0:
				return False
		return True

def pop_count(x):
	x = x - (x >> 1 & 6148914691236517205)
	x = (x & 3689348814741910323) + (x >> 2 & 3689348814741910323)
	x = x + (x >> 4) & 1085102592571150095
	x = x + (x >> 8)
	x = x + (x >> 16)
	x = x + (x >> 32)
	return x & 127
MOD = int(1000000000.0) + 7
INF = int(1000000000000000.0)

def solve():
	(N, A, B, C, D) = Scanner.map_int()
	if N * (A - B) > C + D:
		return False
	if C - D > N * (A + B):
		return False
	return True

def main():
	T = Scanner.int()
	for _ in range(T):
		print('YNEOS'[not solve()::2])
main()


for _ in range(int(input())):
	(n, a, b, c, d) = map(int, input().split())
	ans = (a - b) * n
	ans2 = (a + b) * n
	f = 1
	if ans2 < c - d:
		f = 0
	if ans > c + d:
		f = 0
	if f == 1:
		print('Yes')
	else:
		print('No')


def rice(n, a, b, c, d):
	x = n * (a + b)
	y = n * (a - b)
	if x < c - d:
		return 'No'
	elif y > c + d:
		return 'No'
	return 'Yes'
t = int(input())
for i in range(t):
	(n, a, b, c, d) = map(int, input().split())
	print(rice(n, a, b, c, d))


for _ in range(int(input())):
	(n, a, b, c, d) = map(int, input().split())
	x = (a - b) * n
	y = (a + b) * n
	X = c - d
	Y = c + d
	if Y < x or X > y:
		print('NO')
	else:
		print('YES')


t = int(input())
for i in range(t):
	(n, a, b, c, d) = map(int, input().split())
	min1 = (a - b) * n
	max1 = (a + b) * n
	min2 = c - d
	max2 = c + d
	if max2 < min1 or max1 < min2:
		print('NO')
	else:
		print('YES')


t = int(input())
for _ in range(t):
	(n, a, b, c, d) = (int(i) for i in input().split())
	minw = n * (a - b)
	maxw = n * (a + b)
	minb = c - d
	maxb = c + d
	if minb in range(minw, maxw + 1):
		print('Yes')
	elif maxb in range(minw, maxw + 1):
		print('Yes')
	elif minb < minw and maxb > maxw:
		print('Yes')
	else:
		print('No')


import math
for _ in range(int(input())):
	(n, a, b, c, d) = [int(i) for i in input().split()]
	l = n * (a - b)
	r = n * (a + b)
	if r < c - d or l > c + d:
		print('No')
	else:
		print('Yes')


t = int(input())
for _ in range(t):
	(n, a, b, c, d) = map(int, input().split())
	x = abs(a - b)
	y = abs(b + a)
	w = abs(c - d)
	z = abs(c + d)
	a = 0
	if n * x > z or n * y < w:
		print('No')
	else:
		print('Yes')


def main():
	t = int(input())
	for _ in range(t):
		(n, a, b, c, d) = [int(x) for x in input().split()]
		min_w = (a - b) * n
		max_w = (a + b) * n
		if min_w > c + d or max_w < c - d:
			print('No')
		else:
			print('Yes')
main()


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

def linp():
	x = [int(i) for i in input().split()]
	return x
T = inp()
ans = []
for t in range(T):
	(n, a, b, c, d) = linp()
	if n * (a - b) <= c + d and n * (a + b) >= c - d:
		ans.append('Yes')
	else:
		ans.append('No')
for a in ans:
	print(a)


import os
import sys
from io import BytesIO, IOBase

def solution(n):
	pass

def main():
	for _ in range(r_int()):
		(n, a, b, c, d) = r_array()
		(ub, lb) = (a + b, a - b)
		(ub2, lb2) = (c + d, c - d)
		if ub * n < lb2:
			write('NO')
			continue
		if lb * n > ub2:
			write('NO')
			continue
		write('YES')
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')

def write(*args, end='\n'):
	for x in args[:-1]:
		sys.stdout.write(str(x) + ' ')
	sys.stdout.write(str(args[-1]))
	sys.stdout.write(end)

def r_array():
	return [int(x) for x in input().split()]

def r_int():
	return int(input())
main()


for t in range(int(input())):
	(n, a, b, c, d) = map(int, input().split())
	ming = a - b
	maxg = a + b
	minp = c - d
	maxp = c + d
	if maxp < n * ming or n * maxg < minp:
		print('No')
	else:
		print('Yes')


import math
t = int(input())
while t:
	(n, a, b, c, d) = input().split()
	(n, a, b, c, d) = [int(n), int(a), int(b), int(c), int(d)]
	if n * (a - b) > c + d or n * (a + b) < c - d:
		print('No')
	else:
		print('Yes')
	t -= 1


t = int(input())
ans = []
for i in range(t):
	(n, a, b, c, d) = map(int, input().split())
	if (a - b) * n > c + d or (a + b) * n < c - d:
		ans.append('No')
	else:
		ans.append('Yes')
print(*ans, sep='\n')


for _ in range(int(input())):
	(n, a, b, c, d) = map(int, input().split())
	low = a - b
	hig = a + b
	val = low * n
	if val >= c - d and val <= c + d:
		print('YES')
	elif val < c - d and val + (hig - low) * n >= c - d:
		print('YES')
	else:
		print('NO')


for _ in range(int(input())):
	(n, a, b, c, d) = [int(x) for x in input().split()]
	mxr = a + b
	mnr = a - b
	mxb = c + d
	mnb = c - d
	flag = False
	if n * mxr >= mnb and n * mnr <= mxb:
		flag = True
	if flag:
		print('Yes')
	else:
		print('No')


import math
t = int(input())
count = 0
while count < t:
	count += 1
	vals = input()
	vals = vals.split(' ')
	for i in list(range(len(vals))):
		vals[i] = int(vals[i])
	b = abs(vals[0] * vals[1] - vals[3]) <= vals[0] * vals[2] + vals[4]
	if b:
		print('YES')
	else:
		print('NO')


for _ in range(int(input())):
	(n, a, b, c, d) = list(map(int, input().split()))
	right = 'Yes'
	wrong = 'No'
	if -n * b - d <= c - n * a <= n * b + d:
		print(right)
	else:
		print(wrong)


from collections import Counter
t = int(input())
for _ in range(t):
	(n, a, b, c, d) = map(int, input().split())
	ans = n * (a - b)
	ans1 = n * (a + b)
	cc = c - d
	dd = d + c
	if ans1 < cc or ans > dd:
		print('No')
	else:
		print('Yes')


def tiktok(a, b, c, d, n):
	(minGrain, maxGrain) = (a - b, a + b)
	(minPack, maxPack) = (c - d, c + d)
	if minGrain * n > maxPack or maxGrain * n < minPack:
		return 'No'
	return 'Yes'
for t in range(int(input())):
	(n, a, b, c, d) = map(int, input().split())
	print(tiktok(a, b, c, d, n))


for _ in range(int(input())):
	(n, a, b, c, d) = map(int, input().split())
	(xmx, xmn) = (a + b, a - b)
	(wmx, wmn) = (c + d, c - d)
	(smx, smn) = (n * xmx, n * xmn)
	flag = False
	if smn <= wmx and smn >= wmn:
		flag = True
	elif smn <= wmn and smx >= wmn:
		flag = True
	if flag:
		print('Yes')
	else:
		print('No')


from sys import stdin, stdout
import math, sys
from itertools import permutations, combinations
from collections import defaultdict, deque, OrderedDict
import bisect as bi
import heapq

def I():
	return int(input())

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

def main():
	try:
		(n, a, b, c, d) = In()
		(t1, t2) = (n * (a - b), n * (a + b))
		if t1 > c + d:
			print('No')
		elif t2 < c - d:
			print('No')
		else:
			print('Yes')
	except:
		pass
M = 998244353
P = 1000000007
for _ in range(I()):
	main()


for i in range(int(input())):
	(n, a, b, c, d) = map(int, input().split())
	print('No' if abs(n * a - c) > d + n * b else 'Yes')


for _ in range(int(input())):
	(n, a, b, c, d) = map(int, input().split())
	left = n * (a - b)
	right = n * (a + b)
	sum_left = c - d
	sum_right = c + d
	if max(left, sum_left) <= min(right, sum_right):
		print('YES')
	else:
		print('NO')


T = int(input())
for t in range(T):
	(N, A, B, C, D) = [int(i) for i in input().split()]
	if (A - B) * N > C + D or (A + B) * N < C - D:
		print('No')
	else:
		print('Yes')


import sys
import bisect
input = sys.stdin.readline
t = int(input())
for _ in range(t):
	(n, a, b, c, d) = map(int, input().split())
	l = n * (a - b)
	r = n * (a + b)
	lf = c - d
	rf = c + d
	if l > rf or r < lf:
		print('No')
	else:
		print('Yes')


import math, string, itertools, fractions, heapq, collections, re, array, bisect, sys, copy, functools
sys.setrecursionlimit(10 ** 7)
inf = 10 ** 20
eps = 1.0 / 10 ** 10
mod = 10 ** 9 + 7
mod2 = 998244353
dd = [(-1, 0), (0, 1), (1, 0), (0, -1)]
ddn = [(-1, 0), (-1, 1), (0, 1), (1, 1), (1, 0), (1, -1), (0, -1), (-1, -1)]

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

def LLI():
	return [list(map(int, l.split())) for l in sys.stdin.readlines()]

def LI_():
	return [int(x) - 1 for x in sys.stdin.readline().split()]

def LF():
	return [float(x) for x in sys.stdin.readline().split()]

def LS():
	return sys.stdin.readline().split()

def I():
	return int(sys.stdin.readline())

def F():
	return float(sys.stdin.readline())

def S():
	return input()

def pf(s):
	return print(s, flush=True)

def pe(s):
	return print(str(s), file=sys.stderr)

def JA(a, sep):
	return sep.join(map(str, a))

def JAA(a, s, t):
	return s.join((t.join(map(str, b)) for b in a))

def main():
	t = I()
	rr = []
	for _ in range(t):
		(n, a, b, c, d) = LI()
		t = (a - b) * n
		u = (a + b) * n
		e = c - d
		f = c + d
		if t > f or u < e:
			rr.append('No')
		else:
			rr.append('Yes')
	return JA(rr, '\n')
print(main())


for t in range(int(input())):
	(n, a, b, c, d) = map(int, input().split())
	k = c - d
	j = c + d
	y = n * (a - b)
	z = n * (a + b)
	if z < k or y > j:
		print('NO')
	else:
		print('YES')


t = int(input())
res = ''
for x in range(t):
	(n, a, b, c, d) = map(int, input().split())
	(mi, ma) = (n * (a - b), n * (a + b))
	if ma < c - d or mi > c + d:
		res += 'No\n'
	else:
		res += 'Yes\n'
print(res)


import re
import sys
from bisect import bisect, bisect_left, insort, insort_left
from collections import Counter, defaultdict, deque
from copy import deepcopy
from decimal import Decimal
from itertools import accumulate, combinations, combinations_with_replacement, groupby, permutations, product
from math import acos, asin, atan, ceil, cos, degrees, factorial, gcd, hypot, log2, pi, radians, sin, sqrt, tan
from operator import itemgetter, mul
from string import ascii_lowercase, ascii_uppercase, digits

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

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

def instr():
	s = input()
	return list(s[:len(s)])

def invr():
	return map(int, input().split())
t = inp()
for _ in range(t):
	(n, a, b, c, d) = invr()
	res = 'No'
	t1 = (a - b) * n
	t2 = (a + b) * n
	if t2 >= c - d and t1 <= c + d:
		res = 'Yes'
	print(res)


import math
t = int(input())
for _ in range(t):
	(n, a, b, c, d) = [int(i) for i in input().split()]
	x1 = n * (a - b)
	x11 = n * (a + b)
	y1 = c - d
	y11 = c + d
	if x11 < y1 or y11 < x1:
		print('No')
	else:
		print('Yes')


import sys
from collections import defaultdict as dd

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

def out(var):
	sys.stdout.write(str(var))

def l():
	return list(sp())

def strl():
	return list(strsp())

def sp():
	return map(int, data().split())

def strsp():
	return map(str, data().split())
for _ in range(int(data())):
	(n, a, b, c, d) = sp()
	e = (a - b) * n
	f = (a + b) * n
	g = c - d
	h = c + d
	if g <= e and e <= h or (g <= f and f <= h) or (e <= g and g <= f) or (e <= h and h <= f):
		print('Yes')
	else:
		print('No')


for _ in range(int(input())):
	(n, a, b, c, d) = map(int, input().split())
	mn1 = a - b
	mx1 = a + b
	mn2 = c - d
	mx2 = c + d
	if n * mx1 >= mn2 and n * mn1 <= mx2:
		print('YES')
	else:
		print('NO')


import math

def main():
	for q in range(int(input())):
		(n, a, b, c, d) = map(int, input().split())
		if n * (a - b) > c + d or n * (a + b) < c - d:
			print('NO')
		else:
			print('YES')
main()


for _ in range(int(input())):
	(n, a, b, c, d) = map(int, input().split())
	(emin, emax) = (a - b, a + b)
	(xmin, xmax) = (n * emin, n * emax)
	if xmax < c - d or xmin > c + d:
		print('No')
	else:
		print('Yes')


t = input()
t = int(t)
while t != 0:
	temp = 0
	x = input()
	lis = x.split()
	lis[0] = int(lis[0])
	lis[1] = int(lis[1])
	lis[2] = int(lis[2])
	lis[3] = int(lis[3])
	lis[4] = int(lis[4])
	low = lis[1] - lis[2]
	high = lis[1] + lis[2]
	if lis[3] - lis[4] > high * lis[0] or lis[3] + lis[4] < low * lis[0]:
		print('No')
	else:
		print('Yes')
	t = t - 1


t = int(input())
for i in range(t):
	(n, a, b, c, d) = map(int, input().split())
	ming = n * (a - b)
	maxg = n * (a + b)
	minp = c - d
	maxp = c + d
	if minp >= ming and minp <= maxg:
		print('YES')
	elif maxp >= ming and maxp <= maxg:
		print('YES')
	elif ming >= minp and ming <= maxp:
		print('YES')
	elif maxg >= minp and maxg <= maxp:
		print('YES')
	else:
		print('NO')


for t in range(int(input())):
	(n, a, b, c, d) = map(int, input().split())
	r = 0
	for i in range(c - d, c + d + 1):
		if i / n <= a + b and i / n >= a - b:
			r = 1
			break
	if r == 1:
		print('Yes')
	else:
		print('No')


import bisect
t = int(input())
for _ in range(t):
	(n, a, b, c, d) = map(int, input().split())
	x = a - b
	y = c - d
	x1 = b + a
	y1 = d + c
	if n * x1 < y or n * x > y1:
		print('NO')
	else:
		print('YES')


import math
import sys
from collections import defaultdict
from collections import Counter
from collections import deque
import bisect
input = iter(sys.stdin.buffer.read().decode().splitlines()).__next__
ilele = lambda : map(int, input().split())
alele = lambda : list(map(int, input().split()))

def list2d(a, b, c):
	return [[c] * b for i in range(a)]

def list3d(a, b, c, d):
	return [[[d] * c for j in range(b)] for i in range(a)]
for _ in range(int(input())):
	(n, a, b, c, d) = ilele()
	x = c - d
	y = c + d
	aa = a - b
	bb = a + b
	f = 1
	if aa * n > y or bb * n < x:
		f = 0
	if f == 1:
		print('Yes')
	else:
		print('No')


T = int(input())
for _ in range(T):
	(n, a, b, c, d) = map(int, input().split())
	miw = c - d
	maw = c + d
	flag = 0
	if n * (a - b) < miw and n * (a + b) < miw:
		flag = 1
	if n * (a + b) > maw and n * (a - b) > maw:
		flag = 1
	if flag == 1:
		print('No')
	else:
		print('Yes')


import sys
input = sys.stdin.buffer.readline

def solve(n, a, b, c, d):
	if (a + b) * n < c - d or (a - b) * n > c + d:
		return False
	return True
t = int(input())
for _ in range(t):
	(n, a, b, c, d) = map(int, input().split())
	ans = solve(n, a, b, c, d)
	if ans:
		print('YES')
	else:
		print('NO')


t = int(input())
for k in range(t):
	bol = True
	(n, a, b, c, d) = map(int, input().rstrip().split())
	if (a + b) * n < c - d or (a - b) * n > c + d:
		print('No')
	else:
		print('Yes')


from sys import stdin, stdout
import bisect
for _ in range(int(input())):
	(n, a, b, c, d) = map(int, stdin.readline().split())
	qs = (a - b) * n
	s = c - d
	qe = (a + b) * n
	e = c + d
	if qe < s or qs > e:
		stdout.write('No\n')
	else:
		stdout.write('Yes\n')


import collections, heapq, itertools, math
groupby = itertools.groupby
rs = lambda : input()
ri = lambda : int(input())
rm = lambda : map(int, input().split())
rai = lambda : [int(x) for x in input().split()]

def solve(n, a, b, c, d):
	return (c - d) / (a + b) <= n <= (c + d) / (a - b)
for _ in range(ri()):
	(n, a, b, c, d) = rm()
	print('Yes' if solve(n, a, b, c, d) else 'No')


def f(l):
	(n, a, b, c, d) = l
	return n * (a - b) <= c + d and n * (a + b) >= c - d
t = int(input())
for _ in range(t):
	l = list(map(int, input().split()))
	print('Yes' if f(l) else 'No')


t = int(input())
for _ in range(t):
	(n, a, b, c, d) = map(int, input().split())
	lo = abs(a - b)
	hi = abs(a + b)
	coi = abs(c - d)
	cou = abs(c + d)
	if n * lo > cou:
		print('No')
	elif n * hi < coi:
		print('No')
	else:
		print('Yes')


for lo in range(int(input())):
	(n, a, b, x, y) = map(int, input().split())
	(s, s1) = (a - b, a + b)
	(p, q) = (x - y, x + y)
	ans = 'Yes'
	if n * s > q or n * s1 < p:
		ans = 'NO'
	print(ans)


for _ in range(int(input())):
	(n, a, b, c, d) = map(int, input().split())
	x = c + d
	y = c - d
	f = 0
	tmin = (a - b) * n
	tmax = (a + b) * n
	if y <= tmin <= x:
		print('YES')
	elif y <= tmax <= x:
		print('YES')
	elif tmin <= y and tmax >= x:
		print('YES')
	else:
		print('NO')


t = int(input())
for i in range(t):
	m = list(map(int, input().split()))
	x = (m[1] - m[2]) * m[0]
	y = (m[1] + m[2]) * m[0]
	w = m[3] - m[4]
	z = m[3] + m[4]
	if w <= x <= z:
		print('Yes')
	elif w <= y <= z:
		print('Yes')
	elif x < w and y > z:
		print('Yes')
	else:
		print('No')


for _ in range(int(input())):
	(n, a, b, c, d) = map(int, input().split())
	(m, x, mm, xx) = ((a - b) * n, (a + b) * n, c - d, c + d)
	print('Yes' if m <= mm and x >= xx or mm <= m <= xx or mm <= x <= xx else 'No')


def intersects(x1, y1, x2, y2):
	if x1 <= x2 and y1 >= y2:
		return True
	if x2 <= x1 and x1 <= y2:
		return True
	if x2 <= y1 and y1 <= y2:
		return True
	return False
t = int(input())
for _ in range(t):
	(n, a, b, c, d) = map(int, input().split())
	if intersects(n * (a - b), n * (a + b), c - d, c + d):
		print('Yes')
	else:
		print('No')


def check(n, a, b, c, d):
	if max((a - b) * n, c - d) > min((a + b) * n, c + d):
		print('NO')
	else:
		print('YES')
t = int(input())
for i in range(t):
	s = input().split(' ')
	n = int(s[0])
	a = int(s[1])
	b = int(s[2])
	c = int(s[3])
	d = int(s[4])
	check(n, a, b, c, d)


for i in range(int(input())):
	(n, a, b, c, d) = [int(i) for i in input().split()]
	mi = (a - b) * n
	ma = (a + b) * n
	if ma >= c - d and mi <= c - d or (ma >= c + d and mi <= c + d) or (mi >= c - d and ma <= c + d):
		print('Yes')
	else:
		print('No')


import sys, itertools

def main():
	ans = ''
	for _ in range(int(input())):
		(n, a, b, c, d) = map(int, input().split())
		w = [(a - b) * n, (a + b) * n]
		p = [c - d, c + d]
		s = 0
		if w[0] < p[0]:
			if w[1] < p[0]:
				pass
			elif a - b <= int(p[0] / n) <= a + b:
				s = 1
		if w[0] >= p[0]:
			if w[0] <= p[1]:
				s = 1
			elif a - b <= int(p[0] / n) <= a + b:
				s = 1
		ans += ['No\n', 'Yes\n'][s]
	sys.stdout.write(ans)
main()


for i in range(int(input())):
	(n, a, b, c, d) = [int(i) for i in input().split()]
	gwr = [n * (a - b), n * (a + b)]
	pwr = [c - d, c + d]
	if pwr[0] <= gwr[0] <= pwr[1] or pwr[0] <= gwr[1] <= pwr[1] or gwr[0] <= pwr[0] <= gwr[1] or (gwr[0] <= pwr[1] <= gwr[1]):
		print('Yes')
	else:
		print('No')


for t in range(int(input())):
	n = list(map(int, input().split()))
	mig = n[0] * (n[1] - n[2])
	mag = n[0] * (n[1] + n[2])
	lis = [mig, mag]
	mip = n[3] - n[4]
	mapa = n[3] + n[4]
	org = [mip, mapa]
	if min(lis) > max(org) or max(lis) < min(org):
		print('No')
	else:
		print('Yes')


t = input()
for x in range(int(t)):
	(q, x, y, z, w) = input().split()
	(n, a, b, c, d) = (int(q), int(x), int(y), int(z), int(w))
	if (a - b) * n <= c + d:
		if (a + b) * n >= c - d:
			print('Yes')
		else:
			print('No')
	else:
		print('No')


for j in range(int(input())):
	(n, a, b, c, d) = map(int, input().split())
	t1 = n * (a - b)
	t2 = n * (a + b)
	r1 = c - d
	r2 = c + d
	if t2 - t1 <= r2 - r1:
		if r1 <= t1 <= r2 or r1 <= t2 <= r2:
			print('Yes')
		else:
			print('No')
	elif t1 <= r1 <= t2 or t1 <= r2 <= t2:
		print('Yes')
	else:
		print('NO')


t = int(input())
for i in range(t):
	(n, a, b, c, d) = map(int, input().split())
	package_max = c + d
	package_min = c - d
	weight_min = (a - b) * n
	weight_max = (a + b) * n
	if weight_max >= package_min and weight_min <= package_max:
		print('Yes')
	else:
		print('No')


T = int(input())
for i in range(1, T + 1):
	n = input().split(' ')
	[N, a, b, c, d] = [int(n[0]), int(n[1]), int(n[2]), int(n[3]), int(n[4])]
	wgmin = a - b
	wgmax = a + b
	twmin = c - d
	twmax = c + d
	if N * wgmax < twmin or N * wgmin > twmax:
		print('No')
	else:
		print('Yes')


output = []
for __ in range(int(input())):
	(N, a, b, c, d) = [int(num) for num in input().split()]
	l = (a - b) * N
	r = (a + b) * N
	if l >= c - d and l <= c + d or (r >= c - d and r <= c + d):
		output.append('Yes')
	elif l < c - d and r > c + d:
		output.append('Yes')
	else:
		output.append('No')
for o in output:
	print(o)


t = int(input())
for i in range(t):
	(n, a, b, c, d) = map(int, input().split())
	min_weight = c - d
	max_weight = c + d
	mi = a - b
	ma = a + b
	if mi * n >= min_weight and mi * n <= max_weight or (ma * n >= min_weight and ma * n <= max_weight):
		print('Yes')
	elif mi * n < min_weight and ma * n > max_weight:
		print('Yes')
	else:
		print('No')


leng = int(input())
for i in range(leng):
	z = input().split()
	z = [int(x) for x in z]
	n = z[0]
	if n * (z[1] + z[2]) >= z[3] + z[4] >= n * (z[1] - z[2]):
		print('Yes')
	elif n * (z[1] + z[2]) >= z[3] - z[4] >= n * (z[1] - z[2]):
		print('Yes')
	elif n * (z[1] + z[2]) <= z[3] + z[4] and n * (z[1] - z[2]) >= z[3] - z[4]:
		print('Yes')
	else:
		print('No')


for i in range(int(input())):
	(n, a, b, c, d) = map(int, input().split())
	a1 = a - b
	a2 = a + b
	r1 = c - d
	r2 = c + d
	ans = 'No'
	x1 = a1 * n
	x2 = a2 * n
	if x1 > r2:
		print('No')
	elif x2 < r1:
		print('No')
	else:
		print('Yes')


t = int(input())
for i in range(t):
	line = input()
	l = line.split(' ')
	l = list(map(int, l))
	minWOfGrain = l[1] - l[2]
	maxWOfGrain = l[1] + l[2]
	minTotal = l[3] - l[4]
	maxTotal = l[3] + l[4]
	minPossible = minTotal / l[0]
	maxPossible = maxTotal / l[0]
	if minPossible <= minWOfGrain:
		if maxPossible >= minWOfGrain:
			print('Yes')
		else:
			print('No')
	elif minPossible <= maxWOfGrain:
		print('Yes')
	else:
		print('No')


t = int(input())
i = 0
while i < t:
	(n, a, b, c, d) = map(int, input().split())
	mineach = a - b
	maxeach = a + b
	minpack = c - d
	maxpack = c + d
	result = ['Yes']
	z = mineach * n
	y = maxeach * n
	if y < minpack or z > maxpack:
		result[0] = 'No'
	print(result[0])
	i = i + 1


import math
t = int(input())
while t > 0:
	t -= 1
	(n, a, b, c, d) = [int(x) for x in input().split()]
	sl = a - b
	su = a + b
	wl = c - d
	wu = c + d
	l = sl * n
	u = su * n
	if l <= wu and u >= wl:
		print('Yes')
	else:
		print('No')


test_case = int(input())
data = []
for j in range(test_case):
	x = input()
	i = list(map(int, x.split(' ')))
	apb = (i[1] + i[2]) * i[0]
	amb = (i[1] - i[2]) * i[0]
	cpd = i[3] + i[4]
	cmd = i[3] - i[4]
	print(('Yes', 'No')[apb < cmd or amb > cpd])


def rice_(n, size):
	val = [(int(i[0]) * (int(i[1]) - int(i[2])), int(i[3]) + int(i[4]), int(i[0]) * (int(i[1]) + int(i[2])), int(i[3]) - int(i[4])) for i in size]
	cond = [i[1] < i[0] or i[2] < i[3] for i in val]
	c = []
	for i in cond:
		if i:
			c.append('No')
		else:
			c.append('Yes')
	print(*c, sep='\n')
n = int(input())
size = [input().split(' ') for _ in range(n)]
rice_(n, size)


for _ in range(int(input())):
	(n, a, b, c, d) = map(int, input().split())
	(al, ar) = (n * (a - b), n * (a + b))
	(bl, br) = (c - d, c + d)
	if al <= bl <= ar or al <= br <= ar or bl <= al <= br or (bl <= ar <= br):
		print('Yes')
	else:
		print('No')


for _ in range(int(input())):
	l = list(map(int, input().split()))
	if l[0] >= (l[3] - l[4]) / (l[1] + l[2]) and l[0] <= (l[3] + l[4]) / (l[1] - l[2]):
		print('YES')
	else:
		print('NO')


import sys
from collections import *
from bisect import *
from math import *
input = sys.stdin.readline
t = int(input())
while t:
	t -= 1
	(n, a, b, c, d) = map(int, input().split())
	if (a - b) * n > c + d or (a + b) * n < c - d:
		print('No')
		continue
	x = (a - b) * n
	if x + (b + b) * n >= c - d:
		print('Yes')
	else:
		print('No')


for test_c in range(int(input())):
	(n, a, b, c, d) = map(int, input().split())
	x = a - b
	y = a + b
	k = c - d
	l = c + d
	if n * x <= l and n * y >= k:
		print('Yes')
	else:
		print('No')


t = int(input())
for _ in range(t):
	(n, a, b, c, d) = map(int, input().split())
	max1 = a + b
	min1 = a - b
	maxw = c + d
	minw = c - d
	if n * max1 >= minw and n * min1 <= maxw:
		print('Yes')
	else:
		print('No')


for _ in range(int(input())):
	(n, a, b, c, d) = map(int, input().split())
	s1 = a - b
	s2 = a + b
	v1 = c - d
	v2 = c + d
	if s1 * n <= v2 and s2 * n >= v1:
		print('Yes')
	else:
		print('No')


from sys import stdin, stdout
import math, collections
mod = 10 ** 9 + 7
for _ in range(int(stdin.readline())):
	(n, a, b, c, d) = map(int, stdin.readline().split())
	print('NO' if n * (a - b) > c + d or n * (a + b) < c - d else 'YES')


def main():
	t = int(input())
	ans = []
	for i in range(t):
		(n, a, b, c, d) = map(int, input().split())
		low = n * (a - b)
		high = n * (a + b)
		if low > c + d or high < c - d:
			ans.append('No')
		else:
			ans.append('Yes')
	for i in ans:
		print(i)
main()


t = int(input())
for _ in range(t):
	(n, a, b, c, d) = [int(i) for i in input().split()]
	lower_bound = c - d
	upper_bound = c + d
	flag = 0
	for i in range(a - b, a + b + 1):
		tot = i * n
		if lower_bound <= tot <= upper_bound:
			print('Yes')
			flag = 1
			break
		elif tot < lower_bound:
			rem = lower_bound - tot
			if rem < n and i + 1 <= a + b:
				print('Yes')
				flag = 1
				break
	if flag == 0:
		print('No')


for _ in range(int(input())):
	(n, a, b, c, d) = list(map(int, input().split()))
	minsum = c - d
	maxsum = c + d
	mingrain = a - b
	maxgrain = a + b
	if n * maxgrain < minsum:
		print('no')
	elif n * mingrain > maxsum:
		print('no')
	else:
		print('yes')


for _ in range(int(input())):
	(n, a, b, c, d) = map(int, input().split())
	(x, y, X, Y) = (a + b, a - b, c + d, c - d)
	if a + b < (c - d) / n or a - b > (c + d) / n:
		print('No')
	else:
		print('Yes')


n = int(input())
while n > 0:
	(gn, a, b, c, d) = map(int, input().split())
	if gn * (a - b) > c + d:
		print('No')
		pass
	elif gn * (a + b) < c - d:
		print('No')
		pass
	else:
		print('Yes')
		pass
	n = n - 1


t = int(input())
q = [0] * t
for i in range(t):
	(n, a, b, c, d) = map(int, input().split())
	if c + d < (a - b) * n or (a + b) * n < c - d:
		q[i] = 1
for i in range(t):
	if q[i] > 0:
		print('NO')
	else:
		print('Yes')


t = int(input())
for y in range(t):
	(n, a, b, c, d) = map(int, input().split())
	lb = n * (a - b)
	rb = n * (a + b)
	if lb > c + d or rb < c - d:
		print('No')
	else:
		print('Yes')


from collections import defaultdict

def main():
	cc = int(input())
	for ccc in range(cc):
		(n, a, b, c, d) = [int(v) for v in input().split()]
		print('Yes' if c - d <= n * (a + b) and n * (a - b) <= c + d else 'No')
main()


t = int(input())
for _ in range(t):
	(n, a, b, c, d) = map(int, input().split())
	low = (a - b) * n
	high = (a + b) * n
	if high >= c - d and low <= c + d:
		print('Yes')
	else:
		print('No')


for _ in range(int(input())):
	(n, a, b, c, d) = map(int, input().split())
	w1 = a - b
	w2 = a + b
	g1 = c - d
	g2 = c + d
	if n * w1 > g2 or n * w2 < g1:
		print('No')
	else:
		print('Yes')


t = int(input())
for _ in range(t):
	(n, a, b, c, d) = map(int, input().split())
	k1 = n * abs(a - b)
	k2 = n * (a + b)
	if k2 < c - d or k1 > c + d:
		print('NO')
	else:
		print('YES')


import math, itertools, fractions, heapq, collections, bisect, sys, queue, copy
sys.setrecursionlimit(10 ** 7)
inf = 10 ** 20
mod = 10 ** 9 + 7
dd = [(-1, 0), (0, 1), (1, 0), (0, -1)]
ddn = [(-1, 0), (-1, 1), (0, 1), (1, 1), (1, 0), (1, -1), (0, -1), (-1, -1)]

def LI():
	return [int(x) for x in sys.stdin.readline().split()]

def I():
	return int(sys.stdin.readline())

def F():
	return float(sys.stdin.readline())

def LS():
	return sys.stdin.readline().split()

def S():
	return input()

def main():
	n = I()
	ans = []
	for _ in range(n):
		(k, a, b, c, d) = LI()
		x1 = max(0, a - b)
		x2 = a + b
		y1 = max(0, c - d)
		y2 = c + d
		x1 *= k
		x2 *= k
		if y1 <= x2 <= y2 or y1 <= x1 <= y2 or x1 <= y1 <= x2 or (x1 <= y2 <= x2):
			ans.append('Yes')
		else:
			ans.append('No')
	for x in ans:
		print(x)
main()


t = int(input())
for i in range(t):
	(n, a, b, c, d) = [int(s) for s in input().split()]
	flag = False
	if n * (a + b) < c - d:
		flag = True
	elif n * (a - b) > c + d:
		flag = True
	if flag:
		print('No')
	else:
		print('Yes')


import math
t = int(input())
for i in range(t):
	(n, a, b, c, d) = map(int, input().split())
	a1 = a - b
	a2 = a + b
	a3 = n * a1
	a4 = n * a2
	c1 = c - d
	c2 = c + d
	if c1 <= a3 <= c2 or c1 <= a4 <= c2:
		print('YES')
	elif a3 <= c1 <= a4 or a3 <= c2 <= a4:
		print('YES')
	else:
		print('NO')


for _ in range(int(input())):
	l = [int(x) for x in input().split()]
	n = l[0]
	a = l[1]
	b = l[2]
	c = l[3]
	d = l[4]
	grain_min = a - b
	grain_max = a + b
	total_min = c - d
	total_max = c + d
	if grain_min * n >= total_min and grain_min * n <= total_max:
		print('YES')
	elif grain_max * n >= total_min and grain_max * n <= total_max:
		print('YES')
	elif grain_min * n < total_min and grain_max * n > total_max:
		print('YES')
	else:
		print('NO')


t = int(input())
x = []
for i in range(t):
	x.append(list(map(int, input().rstrip().split())))
for i in range(t):
	n = x[i][0]
	a = x[i][1]
	b = x[i][2]
	c = x[i][3]
	d = x[i][4]
	max_m = a + b
	min_m = a - b
	net_min = c - d
	net_max = c + d
	if min_m * n > net_max or max_m * n < net_min:
		print('No')
	else:
		print('Yes')


t = int(input())
for _ in range(t):
	(n, a, b, c, d) = map(int, input().split())
	f = 0
	x = abs(a - b) * n
	y = (a + b) * n
	xx = abs(c - d)
	yy = c + d
	if y >= xx and yy >= x:
		print('YES')
	else:
		print('NO')


for _ in range(int(input())):
	(n, a, b, c, d) = map(int, input().split())
	minwt = c - d
	maxwt = c + d
	minr = n * (a - b)
	maxr = n * (a + b)
	if maxr < minwt or minr > maxwt:
		print('No')
	else:
		print('Yes')


t = int(input())
for i in range(t):
	(n, a, b, c, d) = list(map(int, input().split()))
	ans = False
	mintot = n * (a - b)
	maxtot = n * (a + b)
	if mintot > c + d or maxtot < c - d:
		print('No')
	else:
		print('Yes')


for _ in range(int(input())):
	(n, a, b, c, d) = map(int, input().split())
	lmax = c - d
	rmax = c + d
	l = (a - b) * n
	r = (a + b) * n
	print('No' if r < lmax or l > rmax else 'Yes')


for _ in range(int(input())):
	(n, a, b, c, d) = map(int, input().split())
	e = c - d
	f = c + d
	g = n * (a - b)
	h = n * (a + b)
	if g < e and h < e or (g > f and h > f):
		print('No')
	else:
		print('Yes')


t = int(input())
for _ in range(t):
	l = input()
	l = l.split()
	for j in range(len(l)):
		l[j] = int(l[j])
	max_1 = (l[1] + l[2]) * l[0]
	min_1 = (l[1] - l[2]) * l[0]
	max_n = l[3] + l[4]
	min_n = l[3] - l[4]
	if max_1 >= min_n and min_1 <= max_n:
		print('YES')
	elif max_n >= min_1 and min_n <= max_1:
		print('YES')
	else:
		print('NO')


I = input
t = int(I())
for _ in range(t):
	(n, a, b, c, d) = map(int, I().split())
	print('YES' if n * (a - b) <= c + d and n * (a + b) >= c - d else 'NO')


import io, os
input = io.BytesIO(os.read(0, os.fstat(0).st_size)).readline
import sys

def main():
	t = int(input())
	for _ in range(t):
		(n, a, b, c, d) = map(int, input().split())
		(l1, r1) = ((a - b) * n, (a + b) * n)
		(l2, r2) = (c - d, c + d)
		print('NO' if r1 < l2 or r2 < l1 else 'YES')
main()


for i in range(int(input())):
	(n, a, b, c, d) = map(int, input().split())
	tw_min = c - d
	tw_max = c + d
	w_min = (a - b) * n
	w_max = (a + b) * n
	if w_min >= tw_min and w_min <= tw_max or (w_max >= tw_min and w_min <= tw_max):
		print('YES')
	else:
		print('NO')


t = int(input())
while t:
	(n, a, b, c, d) = map(int, input().split())
	mg = n * (a + b)
	sg = n * (a - b)
	sp = c - d
	mp = c + d
	if sg <= mp and mg >= sp:
		print('Yes')
	else:
		print('No')
	t = t - 1


for i in range(int(input())):
	(n, a, b, c, d) = list(map(int, input().split()))
	A = a - b
	B = a + b
	C = c + d
	D = c - d
	if D <= B * n and A * n <= C:
		print('Yes')
	else:
		print('No')


for _ in range(int(input())):
	(n, a, b, c, d) = map(int, input().split())
	t1 = (a - b) * n
	t2 = (a + b) * n
	s1 = c - d
	s2 = c + d
	if not (t2 < s1 or t1 > s2):
		print('Yes')
	else:
		print('No')


for i in range(int(input())):
	(n, a, b, c, d) = map(int, input().split())
	(a, b, c, d) = (abs(a - b), b + a, abs(c - d), c + d)
	ans = 0
	if n * a > d:
		ans = -1
	elif n * b < c:
		ans = -1
	if ans == 0:
		print('Yes')
	else:
		print('No')


no_test_cases = int(input())
for i in range(no_test_cases):
	info = list(map(int, input().split(' ')))
	(n, a, b, c, d) = info
	min_weight_grain = n * (a - b)
	max_weight_grain = n * (a + b)
	if max_weight_grain >= c - d and min_weight_grain <= c + d:
		print('Yes')
	else:
		print('No')


from sys import stdin, setrecursionlimit, stdout
from collections import deque
from math import sqrt, floor, ceil, log, log2, log10, pi, gcd, sin, cos, asin

def ii():
	return int(stdin.readline())

def fi():
	return float(stdin.readline())

def mi():
	return map(int, stdin.readline().split())

def fmi():
	return map(float, stdin.readline().split())

def li():
	return list(mi())

def lsi():
	x = list(stdin.readline())
	x.pop()
	return x

def si():
	return stdin.readline()
res = ['Yes', 'No']
t_c = ii()
while t_c:
	t_c -= 1
	(n, a, b, c, d) = mi()
	f = 0
	if (c + d) / n < a - b or (c - d) / n > a + b:
		f = 1
	print(res[f])


t = input()
for _ in range(int(t)):
	(ct, a, b, c, d) = map(int, input().split())
	if not (a - b) * ct <= c + d or not (a + b) * ct >= c - d:
		ans = 'No'
	else:
		ans = 'Yes'
	print(ans)


t = input()
t = int(t)
while t:
	(n, a, b, c, d) = input().split()
	n = int(n)
	a = int(a)
	b = int(b)
	c = int(c)
	d = int(d)
	min = n * (a - b)
	max = n * (a + b)
	if min > c + d or max < c - d:
		print('No')
	else:
		print('Yes')
	t = t - 1


import sys
readline = sys.stdin.readline
flush = sys.stdout.flush
T = int(readline())
for t in range(T):
	(n, a, b, c, d) = map(int, input().split())
	minimum = (a - b) * n
	maximum = (a + b) * n
	Minimum = c - d
	Maximum = c + d
	count = 0
	if minimum <= Minimum <= maximum:
		print('Yes')
	elif Minimum <= minimum <= Maximum:
		print('Yes')
	elif Minimum <= minimum and maximum <= Maximum:
		print('Yes')
	else:
		print('No')


def scanf():
	return list(map(int, input().split()))
for t in range(int(input())):
	(n, a, b, c, d) = scanf()
	p = n * (a - b)
	q = n * (a + b)
	if p > c + d or q < c - d:
		print('NO')
	else:
		print('YES')


t = int(input())
for _ in range(t):
	(n, a, b, c, d) = map(int, input().split())
	lg = (a - b) * n
	hg = (a + b) * n
	lb = c - d
	hb = c + d
	x = max(lg, lb)
	y = min(hg, hb)
	if y - x < 0:
		print('No')
	else:
		print('Yes')


def solve(n, a, b, c, d):
	if (a - b) * n <= c + d and (a + b) * n >= c - d:
		return 'Yes'
	else:
		return 'No'
T = int(input())
for i in range(T):
	n = list(map(int, input().split(' ')))
	print(solve(n[0], n[1], n[2], n[3], n[4]))


t = int(input())
for i in range(t):
	(n, a, b, c, d) = map(int, input().split())
	g1 = n * (a - b)
	g2 = n * (a + b)
	p1 = c - d
	p2 = c + d
	if g1 > p2 or g2 < p1:
		print('No')
	else:
		print('Yes')


import sys
t = int(sys.stdin.readline())
for _ in range(t):
	(n, a, b, c, d) = map(int, sys.stdin.readline().split())
	result = 'Yes'
	if (a + b) * n < c - d:
		result = 'No'
	elif (a - b) * n > c + d:
		result = 'No'
	print(result)


for _ in range(int(input())):
	(n, a, b, c, d) = map(int, input().split())
	lb = n * (a - b)
	ub = n * (a + b)
	ans = False
	for i in range(c - d, c + d + 1):
		if lb <= i <= ub:
			ans = True
	if ans:
		print('Yes')
	else:
		print('No')


ANS = ''

def cat(a):
	global ANS
	if a:
		ANS += 'YES'
	else:
		ANS += 'NO'
	ANS += '\n'
for i in range(int(input())):
	(n, a, b, c, d) = [int(s) for s in input().split()]
	ans = 1
	if n * (a + b) < c - d:
		ans = 0
	if n * (a - b) > c + d:
		ans = 0
	cat(ans)
print(ANS)


from itertools import combinations, permutations
for _ in range(int(input())):
	(n, a, b, c, d) = map(int, input().split())
	sum1 = 0
	if n * (a - b) > c + d or n * (a + b) < c - d:
		print('No')
	else:
		print('Yes')


t = input()
t = int(t)
for i in range(t):
	(n, a, b, c, d) = map(int, input().split())
	k = n * a - n * b
	j = n * a + n * b
	if k > c + d:
		print('No')
		continue
	if j < c - d:
		print('No')
		continue
	print('Yes')


for _ in range(int(input())):
	(n, a, b, c, d) = list(map(int, input().split()))
	minW = n * (a - b)
	if minW <= c + d and c - d <= (a + b) * n:
		print('yes')
	else:
		print('No')


n_tests = input()
n_tests = int(n_tests)
for i in range(n_tests):
	line = input()
	line = line.split()
	n = int(line[0])
	a = int(line[1])
	b = int(line[2])
	c = int(line[3])
	d = int(line[4])
	if n * (a - b) <= c + d and n * (a + b) >= c - d:
		print('Yes')
	else:
		print('No')


testcase = int(input())
for _ in range(testcase):
	(n, a, b, c, d) = map(int, input().split())
	weight_from = c - d
	weight_to = c + d
	grain_from = a - b
	grain_to = a + b
	flag = False
	for i in range(weight_from, weight_to + 1):
		if i / n >= grain_from and i / n <= grain_to:
			flag = True
			break
	if flag:
		print('Yes')
	else:
		print('No')


for T in range(int(input())):
	(n, a, b, c, d) = list(map(int, input().split()))
	low = c - d
	hig = c + d
	if (a - b) * n > hig or (a + b) * n < low:
		print('No')
	else:
		print('Yes')


t = int(input())
for u in range(t):
	temp = list(map(int, input().rstrip().split()))
	n = temp[0]
	a = temp[1]
	b = temp[2]
	c = temp[3]
	d = temp[4]
	if (a - b) * n > c + d or c - d > (a + b) * n:
		print('No')
	else:
		print('Yes')


t = int(input())
while t:
	a = list(map(int, input().split()))
	u = a[1] + a[2]
	v = a[1] - a[2]
	x = a[3] - a[4]
	y = a[3] + a[4]
	if u * a[0] >= x and u * a[0] <= y:
		print('Yes')
	elif v * a[0] >= x and v * a[0] <= y:
		print('Yes')
	elif v * a[0] <= x and u * a[0] >= y:
		print('Yes')
	else:
		print('No')
	t = t - 1


def main_function():
	from sys import stdin
	from sys import stdout
	input = stdin.readline
	print = stdout.write
	t = int(input())
	for _ in range(t):
		(n, a, b, c, d) = list(map(int, input().split()))
		if c - d <= (a - b) * n <= c + d or c - d <= (a + b) * n <= c + d or (a - b) * n <= c - d <= (a + b) * n or ((a - b) * n <= c + d <= (a + b) * n):
			print('Yes\n')
		else:
			print('No\n')
main_function()


test = int(input())
while test != 0:
	test = test - 1
	(n, a, b, c, d) = input().split()
	x = int(n) * (int(a) - int(b))
	y = int(n) * (int(a) + int(b))
	if x > int(c) + int(d) or y < int(c) - int(d):
		print('NO')
	else:
		print('YES')


T = int(input())
for t in range(T):
	(n, a, b, c, d) = [int(i) for i in input().split()]
	single_lower = n * (a - b)
	single_upper = n * (a + b)
	total_lower = c - d
	total_upper = c + d
	if single_lower <= total_upper and total_lower <= single_upper:
		print('Yes')
	else:
		print('No')


from sys import stdin
inp = lambda : stdin.readline().strip()
t = int(inp())
for i in range(t):
	(g, a, b, c, d) = [int(x) for x in input().split()]
	if (a + b) * g < c - d or (a - b) * g > c + d:
		print('NO')
	else:
		print('YES')


test = int(input())
for x in range(test):
	inputsrt = input()
	userlist = inputsrt.split()
	w = int(userlist[1]) - int(userlist[2])
	x = int(userlist[1]) + int(userlist[2])
	range1 = int(userlist[3]) - int(userlist[4])
	range2 = int(userlist[3]) + int(userlist[4])
	min = w * int(userlist[0])
	max = x * int(userlist[0])
	if min in range(range1, range2 + 1):
		print('Yes\n')
	elif max in range(range1, range2 + 1):
		print('Yes\n')
	elif min <= range1 and max >= range2:
		print('Yes')
	else:
		print('No')


for _ in range(0, int(input())):
	(n, a, b, c, d) = map(int, input().split())
	(m, M) = [a - b, a + b]
	(mW, MW) = [c - d, c + d]
	print(['Yes', 'No'][n * m > MW or n * M < mW])


import sys
input = lambda : sys.stdin.readline().rstrip()
inp = sys.stdin.buffer.readline

def I():
	return list(map(int, inp().split()))
for _ in range(I()[0]):
	(n, a, b, c, d) = I()
	flag = 0
	cg = [(a - b) * n, (a + b) * n]
	cb = [c - d, c + d]
	for i in range(c - d, c + d + 1):
		if i >= cg[0] and i <= cg[1]:
			flag = 1
			break
	if flag == 1:
		print('Yes')
	else:
		print('No')


for _ in range(int(input())):
	(n, a, b, c, d) = map(int, input().split())
	t1 = max(abs(a - b), 0)
	t2 = a + b
	q1 = max(abs(c - d), 0)
	q2 = c + d
	if n * t1 <= q2 and n * t2 >= q1:
		print('Yes')
	else:
		print('No')


import math
mod = 10 ** 9 + 7
for i in range(int(input())):
	(n, a, b, c, d) = map(int, input().split())
	h = c + d
	l = c - d
	check_l = a - b
	check_h = a + b
	flag = 0
	if n * (a - b) <= c + d and n * (a + b) >= c - d:
		print('YES')
	else:
		print('NO')


import sys
from functools import lru_cache, cmp_to_key
from heapq import merge, heapify, heappop, heappush, nlargest, nsmallest
from math import ceil, floor, gcd, fabs, factorial, fmod, sqrt, inf, log
from collections import defaultdict as dd, deque, Counter as C
from itertools import combinations as comb, permutations as perm
from bisect import bisect_left as bl, bisect_right as br, bisect
from fractions import Fraction
mod = pow(10, 9) + 7
mod2 = 998244353

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

def out(*var, end='\n'):
	sys.stdout.write(' '.join(map(str, var)) + end)

def l():
	return list(sp())

def sl():
	return list(ssp())

def sp():
	return map(int, data().split())

def ssp():
	return map(str, data().split())

def l1d(n, val=0):
	return [val for i in range(n)]

def l2d(n, m, val=0):
	return [l1d(n, val) for j in range(m)]
for _ in range(int(data())):
	(n, a, b, c, d) = sp()
	(a, b, c, d) = (n * (a - b), n * (a + b), c - d, c + d)
	if c <= a <= d or c <= b <= d or a <= c <= b or (a <= d <= b):
		out('Yes')
		continue
	out('No')


t = int(input())
for i in range(0, t):
	m = [int(x) for x in input().split()]
	v_1 = (m[1] - m[2]) * m[0]
	v_2 = (m[1] + m[2]) * m[0]
	v_3 = m[3] - m[4]
	v_4 = m[3] + m[4]
	if v_2 < v_3 or v_4 < v_1:
		print('No')
	else:
		print('Yes')


for _ in range(int(input())):
	(n, a, b, c, d) = map(int, input().split(' '))
	low_r = a - b
	high_r = a + b
	low_c = c - d
	high_c = c + d
	flag = 0
	if low_c <= n * high_r and n * low_r <= high_c:
		print('YES')
	else:
		print('NO')


tc = int(input())
cases = []
for _ in range(tc):
	cases.append(list(map(int, input().split())))
for case in cases:
	n = case[0]
	(a, b) = (case[1], case[2])
	(c, d) = (case[3], case[4])
	if n * (a - b) > c + d:
		print('No')
	elif n * (a + b) < c - d:
		print('No')
	else:
		print('Yes')


printn = lambda x: print(x, end='')
inn = lambda : int(input())
inl = lambda : list(map(int, input().split()))
inm = lambda : map(int, input().split())
ins = lambda : input().strip()
DBG = True
BIG = 10 ** 18
R = 10 ** 9 + 7

def ddprint(x):
	if DBG:
		print(x)
t = inn()
for tt in range(t):
	(n, a, b, c, d) = inm()
	cd = n * (a - b) <= c + d and c - d <= n * (a + b)
	print('Yes' if cd else 'No')


import os
import sys
from io import BytesIO, IOBase
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')
import math

def fact(x):
	if x == 0:
		return 1
	else:
		return x * fact(x - 1)

def abs(x):
	return x if x >= 0 else -x

def sumelem(x, start, end):
	sum = 0
	for i in range(start, end + 1):
		sum += x[i]
	return sum
for t in range(int(input())):
	(n, a, b, c, d) = list(map(int, input().split()))
	cpd = c + d
	cmd = c - d
	amb = a - b
	apb = a + b
	if amb * n > cpd or apb * n < cmd:
		print('No')
	else:
		print('Yes')


from sys import *
from math import *
from bisect import *
t = int(stdin.readline())
for _ in range(t):
	(n, a, b, c, d) = map(int, stdin.readline().split())
	x = abs(a - b)
	y = abs(a + b)
	a = abs(c - d)
	b = abs(c + d)
	x = n * x
	y = n * y
	if x <= b and y >= a:
		print('Yes')
	else:
		print('No')


t = int(input())
for test in range(t):
	(n, a, b, c, d) = list(map(int, input().split()))
	min_weight = n * (a - b)
	max_weight = n * (a + b)
	if max_weight < c - d:
		print('No')
	elif min_weight > c + d:
		print('No')
	else:
		print('Yes')


t = int(input())
for _ in range(t):
	(n, a, b, c, d) = map(int, input().split())
	x = a - b
	y = a + b
	x1 = c - d
	x2 = c + d
	m = x * n
	n = y * n
	if n < x1 or m > x2:
		print('No')
	else:
		print('Yes')


t = int(input())
for _ in range(t):
	(n, a, b, c, d) = map(int, input().split(' '))
	w1 = a - b
	w2 = a + b
	mw1 = c - d
	mw2 = c + d
	if n * w2 < mw1 or mw2 < n * w1:
		print('No')
	else:
		print('Yes')


for i in range(int(input())):
	(n, a, b, c, d) = map(int, input().split())
	(mi, ma) = (n * (a - b), n * (a + b))
	(mir, mar) = (c - d, c + d)
	if ma < mir or mi > mar:
		print('No')
		continue
	else:
		print('Yes')
		continue


t = int(input())
for tt in range(t):
	(n, a, b, c, d) = [int(x) for x in input().split(' ')]
	mn = n * (a - b)
	ma = n * (a + b)
	if mn > c + d:
		print('No')
	elif ma < c - d:
		print('No')
	else:
		print('Yes')


for _ in range(int(input())):
	(n, a, b, c, d) = map(int, input().split())
	iUp = (a - b) * n
	iDown = (a + b) * n
	tUp = c - d
	tDown = c + d
	if iDown >= tUp and iUp <= tDown:
		print('Yes')
	else:
		print('No')


for t in range(int(input())):
	(n, a, b, c, d) = map(int, input().strip().split())
	A = abs(a - b)
	B = a + b
	C = abs(c - d)
	D = c + d
	if n * A > D:
		print('NO')
	elif n * B < C:
		print('NO')
	else:
		print('YES')


def find():
	(x, a, b, c, d) = map(int, input().split())
	weigh1 = (a - b) * x
	weigh2 = (a + b) * x
	max1 = c - d
	max2 = c + d
	if weigh1 >= max1 and weigh1 <= max2 or (weigh2 >= max1 and weigh2 <= max2):
		print('Yes')
	elif weigh1 <= max1 and weigh2 >= max2:
		print('Yes')
	else:
		print('No')
n = int(input())
for i in range(n):
	find()


def solve():
	ans = n * (a + b) >= c - d and n * (a - b) <= c + d
	if ans:
		print('Yes')
	else:
		print('No')
	return
t = int(input())
for i in range(1, t + 1):
	(n, a, b, c, d) = [int(s) for s in input().split(' ')]
	solve()


import math
t = int(input())
for _ in range(t):
	(n, a, b, c, d) = list(map(int, input().split()))
	c0 = n * a
	d0 = n * b
	if c0 + d0 < c - d or c0 - d0 > c + d:
		print('No')
	else:
		print('Yes')


for _ in range(int(input())):
	(n, a, b, c, d) = map(int, input().split())
	k1 = c + d
	k2 = c - d
	mi = a - b
	ma = a + b
	if ma * n > k1 and mi * n <= k1:
		print('Yes')
	elif mi * n >= k2 and mi * n <= k1:
		print('Yes')
	elif ma * n <= k1 and ma * n >= k2:
		print('Yes')
	else:
		print('No')


from sys import stdin, stdout
for testcases in range(int(stdin.readline())):
	(n, a, b, c, d) = map(int, stdin.readline().split())
	low = n * (a - b)
	high = n * (a + b)
	range1 = c - d
	range2 = c + d
	if low < range1 and high < range1 or (low > c + d and high > c + d):
		print('No')
	else:
		print('Yes')


for _ in range(int(input())):
	(N, A, B, C, D) = map(int, input().split())
	if (A + B) * N < C - D or (A - B) * N > C + D:
		print('No')
	else:
		print('Yes')


T = int(input())
for i in range(T):
	(n, a, b, c, d) = map(int, input().split())
	ab = a + b
	ba = a - b
	cd = c + d
	dc = c - d
	ans = 'No'
	if ba * n <= cd and ab * n >= dc:
		ans = 'Yes'
	print(ans)


t = int(input())
while t > 0:
	t -= 1
	ok = False
	(n, a, b, c, d) = map(int, input().split())
	min_ = n * (a - b)
	max_ = n * (a + b)
	if min_ > c + d or max_ < c - d:
		print('NO')
	else:
		print('YES')


import math, sys
from sys import stdin, stdout
from collections import Counter, defaultdict, deque
input = stdin.readline
I = lambda : int(input())
li = lambda : list(map(int, input().split()))

def case():
	(n, a, b, c, d) = li()
	p = a - b
	q = b + a
	r = c - d
	s = c + d
	if p * n > s or q * n < r:
		print('No')
	else:
		print('Yes')
for _ in range(int(input())):
	case()


t = int(input())
while t != 0:
	t = t - 1
	numbers = input()
	list = numbers.split(' ')
	n = int(list[0])
	a = int(list[1])
	b = int(list[2])
	c = int(list[3])
	d = int(list[4])
	g = 0
	for i in range(c - d, c + d + 1):
		if n * (a - b) <= i <= n * (a + b):
			print('Yes')
			g = 1
			break
	if g != 1:
		print('No')


for _ in range(int(input())):
	(N, a, b, c, d) = map(int, input().split())
	l = a - b
	m = a + b
	x = c - d
	y = c + d
	if l * N >= x and l * N <= y:
		print('Yes')
	elif m * N >= x and m * N <= y:
		print('Yes')
	elif l * N <= x and m * N >= x:
		print('Yes')
	else:
		print('No')


test_cases = int(input())
data = []
while test_cases > 0:
	data.append(list(map(int, input().split())))
	test_cases -= 1
for i in range(0, len(data)):
	n = data[i][0]
	a = data[i][1]
	b = data[i][2]
	c = data[i][3]
	d = data[i][4]
	lowPos = (a - b) * n
	highPos = (a + b) * n
	lowRange = c - d
	highRange = c + d
	recover = False
	while lowPos <= highPos:
		if lowPos >= lowRange and lowPos <= highRange:
			recover = True
			break
		elif lowPos > highRange:
			break
		else:
			lowPos += 1
	if recover:
		print('YES')
	else:
		print('NO')


t = int(input())
for i in range(t):
	(n, a, b, c, d) = map(int, input().strip().split())
	mn = (a - b) * n
	mx = (a + b) * n
	if mx < c - d or mn > c + d:
		print('NO')
	else:
		print('Yes')


from sys import stdin, stderr

def rl():
	return [int(w) for w in stdin.readline().split()]
(t,) = rl()
for _ in range(t):
	(n, a, b, c, d) = rl()
	print('Yes' if n * (a - b) <= c + d and n * (a + b) >= c - d else 'No')


t = int(input())
while t:
	(n, a, b, c, d) = map(int, input().split())
	(twl, twu) = (c - d, c + d)
	sum = (a - b) * n
	sum_limit = (a + b) * n
	while True:
		if sum >= twl and sum <= twu and (sum <= sum_limit):
			print('YES')
			break
		elif sum < twl:
			sum += 1
		else:
			print('NO')
			break
	t -= 1


repeat = int(input())
for i in range(repeat):
	(n, a, b, c, d) = map(int, input().split())
	max_of_seed = n * (a + b)
	min_of_seed = n * (a - b)
	max_of_total = c + d
	min_of_total = c - d
	if min_of_seed > max_of_total or max_of_seed < min_of_total:
		print('No')
	else:
		print('Yes')


t = int(input())
for i in range(t):
	(n, a, b, c, d) = map(int, input().split())
	l_b = (a - b) * n
	u_b = (a + b) * n
	can = 0
	for i in range(-d, d + 1):
		if l_b <= c + i <= u_b:
			print('Yes')
			can = 1
			break
	if not can:
		print('No')


test_cases = int(input())
for i in range(test_cases):
	test_case = list(map(int, input().split()))
	if (test_case[1] + test_case[2]) * test_case[0] >= test_case[3] - test_case[4]:
		if (test_case[1] - test_case[2]) * test_case[0] <= test_case[3] + test_case[4]:
			print('Yes')
		else:
			print('No')
	else:
		print('No')


from math import ceil
for _ in range(int(input())):
	(n, a, b, c, d) = map(int, input().split())
	if (a - b) * n > c + d or (a + b) * n < c - d:
		print('No')
	else:
		print('Yes')


t = input()
t = int(t)
while t:
	t -= 1
	(n, a, b, c, d) = input().split()
	n = int(n)
	a = int(a)
	b = int(b)
	c = int(c)
	d = int(d)
	minwg = a - b
	maxwg = a + b
	minwt = c - d
	maxwt = c + d
	minposwt = n * minwg
	maxposwt = n * maxwg
	if minposwt >= minwt and minposwt <= maxwt:
		print('Yes')
	elif minposwt < minwt and maxposwt > maxwt:
		print('Yes')
	elif maxposwt >= minwt and maxposwt <= maxwt:
		print('Yes')
	else:
		print('No')


I = lambda : list(map(int, input().split()))
for tc in range(int(input())):
	(n, a, b, c, d) = I()
	if n * (a - b) > c + d or n * (a + b) < c - d:
		print('No')
	else:
		print('Yes')


for i in range(int(input())):
	(n, a, b, c, d) = map(int, input().split())
	p = a + b
	q = a - b
	r = c - d
	s = c + d
	u = n * p
	v = n * q
	if r > u or s < v:
		print('No')
	else:
		print('Yes')


t = int(input())
list = []
for test_cases in range(t):
	(n, a, b, c, d) = map(int, input().split())
	w = a - b
	x = a + b
	y = c - d
	z = c + d
	if (n * w >= y or n * x >= y) and (n * w <= z or n * x <= z):
		answer = 1
		list.append(answer)
	else:
		answer = 0
		list.append(answer)
for items in list:
	if items == 1:
		print('Yes')
	else:
		print('No')


from sys import stdin, stdout
q = int(input())
for i in range(q):
	(n, a, b, c, d) = list(map(int, stdin.readline().split()))
	mini = a - b
	maxi = a + b
	mini = mini * n
	maxi = maxi * n
	minis = c - d
	maxis = c + d
	if mini >= minis and mini <= maxis or (maxi >= minis and maxi <= maxis) or (mini <= minis and maxi >= maxis):
		print('Yes')
	else:
		print('No')


testCase = int(input())
test = 0
while test < testCase:
	(numOfGrains, a, b, c, d) = input().split()
	numOfGrains = int(numOfGrains)
	a = int(a)
	b = int(b)
	c = int(c)
	d = int(d)
	diffab = abs(a - b)
	diffcd = abs(c - d)
	sumab = a + b
	sumcd = c + d
	forceBreak = False
	if diffab * numOfGrains <= sumcd and sumab * numOfGrains >= diffcd:
		print('Yes')
	else:
		print('No')
	test += 1


def main(n, a, b, c, d):
	if n * (a + b) < c - d or n * (a - b) > c + d:
		return 'No'
	return 'Yes'
for _ in range(int(input())):
	(n, a, b, c, d) = list(map(int, input().split()))
	print(main(n, a, b, c, d))


from math import *

def solve():
	(n, a, b, c, d) = map(int, input().split())
	x1 = (a - b) * n
	x2 = (a + b) * n
	x3 = c - d
	x4 = c + d
	if x1 > x4 or x2 < x3:
		print('No')
	else:
		print('Yes')
for _ in range(int(input())):
	solve()


import os
import sys
debug = True
if debug and os.path.exists('input.in'):
	input = open('input.in', 'r').readline
else:
	debug = False
	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())
test_count = int(input())
for t in range(test_count):
	(N, A, B, C, D) = invr()
	minW = N * (A - B)
	maxW = N * (A + B)
	if minW > C + D or maxW < C - D:
		print('No')
	else:
		print('Yes')


t = int(input())
for _ in range(t):
	(n, a, b, c, d) = map(int, input().split())
	mi = max(0, a - b)
	ma = a + b
	ansmin = max(0, c - d)
	ansmax = max(0, c + d)
	comeon = ansmin // n
	ans = n * max(mi, min(ma, comeon))
	rem1 = ansmin - ans
	rem = ma - comeon
	if ans >= ansmin and ans <= ansmax:
		print('YES')
		continue
	if ans > ansmax:
		print('NO')
		continue
	if rem >= 1:
		print('YES')
	else:
		print('NO')


t = int(input())
for i in range(t):
	(n, a, b, c, d) = map(int, input().split())
	x = a - b
	y = a + b
	p = c - d
	q = c + d
	if n * x > q:
		print('NO')
	elif n * y < p:
		print('NO')
	else:
		print('YES')


import sys
t = int(input())
for _ in range(t):
	(n, a, b, c, d) = map(int, input().split())
	l = max(c - d, (a - b) * n)
	r = min(c + d, (a + b) * n)
	if l <= r:
		print('Yes')
	else:
		print('No')


import sys

def main():
	t = int(input())
	for _ in range(t):
		(n, a, b, c, d) = map(int, sys.stdin.readline().split())
		maxSum = c + d
		minSum = c - d
		maxW = maxSum // n
		minW = minSum // n
		if n * (a - b) > c + d or n * (a + b) < c - d:
			print('No')
		else:
			print('Yes')
	return
main()


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

def op():
	return list(map(int, input().split()))
for _ in range(int(input())):
	(n, a, b, c, d) = io()
	(t1, t2, t3, t4) = (a - b, a + b, c - d, c + d)
	if (a - b) * n > c + d or (a + b) * n < c - d:
		print('No')
		continue
	else:
		print('Yes')


t = int(input())
for x in range(t):
	(n, a, b, c, d) = map(int, input().split())
	if n * (a + b) < c - d:
		print('NO')
	elif n * (a - b) > c + d:
		print('NO')
	else:
		print('YES')


try:
	t = int(input())
	for i in range(t):
		(n, a, b, c, d) = map(int, input().split())
		wmin = abs(a - b)
		wmax = b + a
		pmin = abs(c - d)
		pmax = d + c
		a1 = wmin * n
		a2 = wmax * n
		if a2 < pmin or pmax < a1:
			print('No')
		else:
			print('Yes')
except:
	pass


for i in range(int(input())):
	(n, a, b, c, d) = map(int, input().split())
	k = n * (a - b)
	l = n * (a + b)
	if k > c + d or l < c - d:
		print('No')
	else:
		print('Yes')


def main():
	(n, a, b, c, d) = map(int, input().split())
	if min(c + d, n * (a + b)) >= max(c - d, n * (a - b)):
		print('Yes')
	else:
		print('No')
tt = int(input())
for cas in range(0, tt):
	main()


for i in range(int(input())):
	(n, a, b, c, d) = map(int, input().split())
	packr1 = c - d
	packr2 = c + d
	gr1 = n * (a - b)
	gr2 = n * (a + b)
	if gr2 < packr1 or gr1 > packr2:
		print('No')
	else:
		print('Yes')


t = int(input())
while True:
	t -= 1
	(n, a, b, c, d) = map(int, input().split())
	grain1 = a - b
	grain2 = a + b
	pack1 = c - d
	pack2 = c + d
	if n * grain1 > pack2 or n * grain2 < pack1:
		print('No')
	else:
		print('Yes')
	if t == 0:
		break


import sys, re
from collections import deque, defaultdict, Counter, OrderedDict
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians, gcd
from heapq import heappush, heappop, heapify, nlargest, nsmallest

def STR():
	return list(input())

def INT():
	return int(input())

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

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

def list2d(a, b, c):
	return [[c] * b for i in range(a)]

def sortListWithIndex(listOfTuples, idx):
	return sorted(listOfTuples, key=lambda x: x[idx])

def sortDictWithVal(passedDic):
	temp = sorted(passedDic.items(), key=lambda kv: (kv[1], kv[0]))
	toret = {}
	for tup in temp:
		toret[tup[0]] = tup[1]
	return toret

def sortDictWithKey(passedDic):
	return dict(OrderedDict(sorted(passedDic.items())))
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7
t = INT()
while t != 0:
	(n, a, b, c, d) = MAP()
	maxX = (a + b) * n
	minX = (a - b) * n
	maxTot = c + d
	minTot = c - d
	if maxX < minTot or minX > maxTot:
		print('No')
	else:
		print('Yes')
	t -= 1


for i in range(int(input())):
	(n, a, b, c, d) = list(map(int, input().split()))
	e = n * (a - b)
	f = n * (a + b)
	if e > c + d or f < c - d:
		print('NO')
	else:
		print('YES')


def solve():
	(n, a, b, c, d) = [int(x) for x in input().split()]
	x = c + d
	y = c - d
	r1 = a - b
	r2 = a + b
	if x / n >= r1 and x / n <= r2:
		print('YES')
	elif y / n >= r1 and y / n <= r2:
		print('YES')
	elif r2 * n >= y and r2 * n <= x:
		print('YES')
	elif r1 * n >= y and r1 * n <= x:
		print('YES')
	else:
		print('NO')
t = int(input())
for i in range(t):
	solve()


for _ in range(int(input())):
	(n, a, b, c, d) = map(int, input().split())
	k = 0
	if (a - b) * n <= c + d and (a + b) * n >= c - d:
		print('Yes')
	else:
		print('No')


from collections import Counter
import itertools
from functools import lru_cache
import sys
import math

def helper():
	pass

def solve():
	(n, a, b, c, d) = map(int, input().split(' '))
	(lo, hi) = (n * (a - b), n * (a + b))
	while lo <= hi:
		mid = (lo + hi) // 2
		if mid >= c - d and mid <= c + d:
			print('Yes')
			return
		elif mid >= c + d:
			hi = mid - 1
		else:
			lo = mid + 1
	print('No')
	return
t = int(input())
for _ in range(t):
	solve()


t = int(input())
for i in range(t):
	(n, a, b, c, d) = map(int, input().split())
	twmin = c - d
	twmax = c + d
	wmin = a - b
	wmax = a + b
	if wmin * n >= twmin and wmin * n <= twmax:
		print('YES')
	elif wmax * n >= twmin and wmax * n <= twmax:
		print('YES')
	elif wmin * n > twmax or wmax * n < twmin:
		print('NO')
	else:
		print('YES')


for i in range(int(input())):
	(n, a, b, c, d) = map(int, input().split())
	p = abs(a - b) * n
	p1 = (a + b) * n
	if p > c + d or p1 < c - d:
		print('NO')
	else:
		print('YES')


def nrise(n, p, q, r, s):
	w1 = (p - q) * n
	w2 = (p + q) * n
	w3 = r - s
	w4 = r + s
	if w2 < w3 or w4 < w1:
		return 'No'
	else:
		return 'Yes'
t = int(input())
for i in range(t):
	(n, p, q, r, s) = map(int, input().split())
	print(nrise(n, p, q, r, s))


import sys
import math

def zap():
	(n, a, b, c, d) = map(int, input().split())
	if (a - b) * n > c + d:
		return 'NO'
	if (a + b) * n < c - d:
		return 'NO'
	return 'YES'
for _ in range(int(input())):
	print(zap())


for _ in range(int(input())):
	(n, a, b, c, d) = map(int, input().split())
	lm = (a - b) * n
	rm = (a + b) * n
	r = min(rm, c + d) >= max(lm, c - d)
	print('YNeos'[not r::2])


t = int(input())
while t != 0:
	t -= 1
	l = list(map(int, input().split()))
	n = l[0]
	a = l[1]
	b = l[2]
	c = l[3]
	d = l[4]
	up = (a + b) * n
	down = (a - b) * n
	ans = True
	if up < c - d:
		ans = False
	if down > c + d:
		ans = False
	if ans:
		print('Yes')
	else:
		print('No')


def main():
	for _ in range(int(input())):
		(n, a, b, c, d) = map(int, input().split())
		x = (a - b) * n
		y = (a + b) * n
		if c + d >= x and c - d <= y:
			print('YES')
		else:
			print('NO')
main()


import sys
t = int(sys.stdin.readline())
for _ in range(t):
	(n, a, b, c, d) = map(int, sys.stdin.readline().split())
	min_num = a - b
	max_num = a + b
	if min_num * n <= c - d <= max_num * n or min_num * n <= c + d <= max_num * n:
		print('Yes')
	elif c - d <= min_num * n <= c + d or c - d <= max_num * n <= c + d:
		print('Yes')
	else:
		print('No')


def solve(n, a, b, c, d):
	mi = c - d
	ma = c + d
	miz = (a - b) * n
	maz = (a + b) * n
	return not (maz < mi or ma < miz)
for _ in range(int(input())):
	(n, a, b, c, d) = map(int, input().split())
	print('Yes') if solve(n, a, b, c, d) else print('No')


import math
n = int(input())
for _ in range(n):
	(n, a, b, c, d) = map(int, input().split())
	flag = 0
	if (a + b) * n < c - d or (a - b) * n > c + d:
		flag = 1
	if flag == 0:
		print('Yes')
	else:
		print('No')


for _ in range(int(input())):
	(n, a, b, c, d) = map(int, input().split())
	mi = n * (a - b)
	ma = n * (a + b)
	cmi = c - d
	cma = c + d
	if mi > cma:
		print('NO')
		continue
	elif ma < cmi:
		print('NO')
		continue
	else:
		print('YES')


for _ in range(int(input())):
	(n, a, b, c, d) = map(int, input().split())
	From = c - d
	To = c + d
	Current = n * (a - b)
	if Current > To:
		print('No')
		continue
	Current = n * (b + a)
	if Current < From:
		print('No')
		continue
	print('Yes')


t = int(input())
for _ in range(t):
	(n, a, b, c, d) = map(int, input().split())
	flag = 1
	minimum = c - d
	maximum = c + d
	x = n * (a - b)
	y = n * (a + b)
	if minimum > y or x > maximum:
		print('No')
	else:
		print('Yes')


t = int(input())
for i in range(t):
	(n, a, b, c, d) = map(int, input().split())
	x = abs(c - d)
	y = c + d
	l = abs(a - b) * n
	m = (a + b) * n
	if y < l or x > m:
		print('NO')
	else:
		print('YES')


for _ in range(int(input())):
	k = list(map(int, input().split()))
	p = abs(k[3] - k[4])
	q = k[3] + k[4]
	an = abs(k[1] - k[2]) * k[0]
	an1 = abs(k[1] + k[2]) * k[0]
	if an < p and an1 < p or (an > q and an1 > q):
		print('NO')
	else:
		print('YES')


import sys

def main():
	test_cases = int(sys.stdin.readline())
	for test_case in range(test_cases):
		line = sys.stdin.readline().split()
		n = int(line[0])
		a = int(line[1])
		b = int(line[2])
		c = int(line[3])
		d = int(line[4])
		max_weight = n * (a + b)
		min_weight = n * (a - b)
		upper_bound = c + d
		lower_bound = c - d
		if max_weight >= lower_bound and min_weight <= lower_bound:
			print('Yes')
		elif min_weight <= upper_bound and max_weight >= upper_bound:
			print('Yes')
		elif max_weight >= upper_bound and min_weight <= lower_bound:
			print('Yes')
		elif max_weight <= upper_bound and min_weight >= lower_bound:
			print('Yes')
		else:
			print('No')
main()


t = int(input())
for _ in range(t):
	(n, a, b, c, d) = map(int, input().split())
	(xil, xir, sl, sr) = (a - b, a + b, c - d, c + d)
	(minxi, maxxr) = (n * xil, n * xir)
	if sl <= minxi <= sr or sl <= maxxr <= sr:
		print('Yes')
		continue
	elif minxi < sl and maxxr > sr:
		print('Yes')
		continue
	elif maxxr < sl or minxi > sr:
		print('No')


from sys import stdin, stdout
input = stdin.buffer.readline
t = int(input())
while t > 0:
	a = [int(x) for x in input().split()]
	n = a[0]
	a = a[1:]
	g1 = (a[0] - a[1]) * n
	g2 = (a[0] + a[1]) * n
	p1 = a[2] - a[3]
	p2 = a[2] + a[3]
	if g2 >= p1 and g1 <= p2:
		print('YES')
	else:
		print('NO')
	t -= 1


from sys import stdin, stdout
test = int(stdin.readline())
for i in range(1, test + 1):
	(n, a, b, c, d) = [int(i) for i in stdin.readline().split()]
	min_grain = (a - b) * n
	max_grain = (a + b) * n
	min_pack = c - d
	max_pack = c + d
	if max_grain < min_pack or min_grain > max_pack:
		stdout.write('No\n')
	else:
		stdout.write('Yes\n')


t = int(input())
for _ in range(t):
	(n, a, b, c, d) = map(int, input().split())
	sm = 0
	fl = 0
	mxs = (a - b) * n
	mins = (a + b) * n
	if mins < c - d or mxs > c + d:
		print('NO')
	else:
		print('YES')


from math import ceil
for _ in range(int(input())):
	(n, a, b, c, d) = map(int, input().split())
	for i in range(c - d, c + d + 1):
		avg = i // n
		if a - b <= avg <= a + b and a - b <= int(ceil(i / n)) <= a + b:
			print('Yes')
			break
	else:
		print('No')


def insertion_sort(l):
	for i in range(len(l)):
		for j in range(i):
			k = i - j
			if l[k] > l[k - 1]:
				(l[k], l[k - 1]) = (l[k - 1], l[k])
	return l

def main_function():
	a = [[int(i) for i in input().split(' ')] for j in range(int(input()))]
	output_list = []
	for i in a:
		(n, a, b, c, d) = i
		max_packet = (a + b) * n
		min_packet = (a - b) * n
		max_packet_1 = c + d
		min_packet_1 = c - d
		if max_packet >= min_packet_1 and max_packet_1 > min_packet or (max_packet_1 >= min_packet and max_packet > min_packet_1) or (max_packet >= max_packet_1 and min_packet <= min_packet_1) or (max_packet <= max_packet_1 and min_packet >= min_packet_1):
			output_list.append('Yes')
		else:
			output_list.append('No')
	return '\n'.join(output_list)
print(main_function())


def NO():
	return print('NO')

def YES():
	return print('YES')

def INT():
	return int(input())

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

def STR():
	return input()

def MAP():
	return map(int, input().split())
for _ in range(INT()):
	(n, a, b, c, d) = MAP()
	if c - d > n * (a + b) or c + d < n * (a - b):
		NO()
	else:
		YES()


def main():
	for t in range(int(input())):
		(n, a, b, c, d) = map(int, input().split())
		x1 = abs(a - b)
		x2 = a + b
		w1 = abs(c - d)
		w2 = abs(c + d)
		mn = n * x1
		mx = n * x2
		if w2 >= mn and w1 <= mx:
			print('Yes')
		else:
			print('No')
main()


from collections import defaultdict as dd

def ri():
	return int(input())

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

def solve():
	(n, a, b, c, d) = rl()
	m = max(a - b, 0)
	M = a + b
	m2 = max(c - d, 0)
	M2 = c + d
	if n * M < m2 or n * m > M2:
		return 'No'
	else:
		return 'Yes'
t = ri()
for i in range(t):
	print(solve())


t = int(input())
for case in range(t):
	(n, a, b, c, d) = [int(x) for x in input().split(' ')]
	if n * (a + b) >= c - d and n * (a - b) <= c + d:
		ans = 'Yes'
	else:
		ans = 'No'
	print(ans)


t = int(input())

def sol():
	(n, a, b, c, d) = map(int, input().split())
	return (a - b) * n <= c + d and (a + b) * n >= c - d
for i in range(t):
	if sol():
		print('Yes')
	else:
		print('No')


tc = int(input())
for _ in range(tc):
	(n, a, b, c, d) = map(int, input().split())
	q = (a - b) * n
	w = (a + b) * n
	e = c - d
	r = c + d
	if w >= e and q <= r:
		print('Yes')
	else:
		print('No')


t = int(input())
while t:
	t += -1
	(n, a, b, c, d) = map(int, input().split())
	t1 = n * (a - b)
	t2 = n * (a + b)
	t3 = c - d
	t4 = c + d
	if t2 < t3 or t1 > t4:
		print('No')
	else:
		print('Yes')


t = int(input())
for z in range(0, t):
	(n, a, b, c, d) = [int(x) for x in input().split()]
	min_total_n = n * (a - b)
	max_total_n = n * (a + b)
	min_val = c - d
	max_val = c + d
	if (max_total_n >= min_val) & (min_total_n <= max_val):
		print('Yes')
	else:
		print('No')


for _ in range(int(input())):
	(n, a, b, c, d) = list(map(int, input().split()))
	l = (a - b) * n
	r = (a + b) * n
	if r < c - d or c + d < l:
		print('No')
	else:
		print('YES')


t = int(input())
while t:
	t -= 1
	a = list(map(int, input().split()))
	mini = a[0] * (a[1] - a[2])
	maxi = a[0] * (a[1] + a[2])
	if maxi < a[3] - a[4] or mini > a[3] + a[4]:
		print('No')
		continue
	print('Yes')


from sys import setrecursionlimit
from collections import deque
import heapq
import functools

def IntInput():
	return int(input())

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

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

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

def modInverse(p, a, m):
	return p % m * pow(a % m, m - 2, m) % m

def compare(item1, item2):
	return item2[0] - item1[0] if item1[0] != item2[0] else item1[1] - item2[1]

def DFS(s, n, paths, answer):
	visited = [False] * (n + 1)
	stack = []
	stack.append(s)
	visited[s] = True
	DFSArray = []
	while stack:
		s = stack.pop()
		DFSArray.append(s)
		flag = 0
		for i in paths[s]:
			if visited[i] == False:
				flag = 1
				stack.append(i)
				visited[i] = True
		if not flag:
			answer[s - 1][1] = 0
	while DFSArray != []:
		s = DFSArray.pop()
		if answer[s - 1][1] < 0:
			answer[s - 1][1] = 0
			for i in paths[s]:
				if answer[i - 1][1] >= 0:
					answer[s - 1][1] += answer[i - 1][1] + 1
	return answer

def BFS(s, n, paths, answer):
	visited = [False] * (n + 1)
	answer[s - 1][0] = 0
	queue = deque()
	queue.append(s)
	visited[s] = True
	while queue:
		s = deque.popleft(queue)
		for i in paths[s]:
			if visited[i] == False:
				queue.append(i)
				answer[i - 1][0] = answer[s - 1][0] + 1
				visited[i] = True
	return answer
numbers = ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9']
for _ in range(int(input())):
	(n, a, b, c, d) = M_IntInput()
	lower = n * (a - b)
	upper = n * (a + b)
	if upper <= c + d and upper >= c - d or (lower <= c + d and upper >= c + d) or (lower <= c - d and upper >= c + d) or (lower >= c - d and upper <= c + d):
		print('Yes')
	else:
		print('No')


n = int(input())
for (i, j) in enumerate(range(n)):
	p = 0
	(m, a, b, c, d) = map(int, input().split())
	l1 = a - b
	l2 = a + b
	k1 = c - d
	k2 = c + d
	s = l1 * m
	t = l2 * m
	if s > k2 or t < k1:
		print('No')
	else:
		print('Yes')


import sys
I = sys.stdin.readline
ans = ''
for _ in range(int(I())):
	(n, a, b, c, d) = map(int, I().split())
	each_pos = a + b
	each_neg = a - b
	total_pos = c + d
	total_neg = c - d
	if each_pos * n < total_neg or each_neg * n > total_pos:
		ans += 'No\n'
	else:
		ans += 'Yes\n'
print(ans)


t = int(input())
for pp in range(0, t):
	(n, a, b, c, d) = map(int, input().split())
	l = a - b
	r = a + b
	y1 = c - d
	y2 = c + d
	base = n * l
	inc = n * (r - l)
	x1 = base
	x2 = base + inc
	if x1 <= y2 and y1 <= x2:
		print('Yes')
	else:
		print('No')


for i in range(int(input())):
	(n, a, b, c, d) = map(int, input().split())
	p = a - b
	q = a + b
	r = c - d
	s = c + d
	if n * p <= s and n * q >= r:
		print('Yes')
	else:
		print('No')


x = int(input())
for i in range(x):
	(n, a, b, c, d) = map(int, input().split())
	min = (a - b) * n
	max = (a + b) * n
	if c - d <= min <= c + d:
		print('Yes')
	elif c - d <= max <= c + d:
		print('Yes')
	elif min <= c - d and max >= c + d:
		print('Yes')
	elif min > c + d:
		print('No')
	elif max < c - d:
		print('No')


from math import *
from copy import *
from heapq import *
from string import *
from random import *
from bisect import *
from sys import stdin
from sys import maxsize
from operator import *
from itertools import *
from collections import Counter
from collections import defaultdict

def solve(l):
	(n, a, b, c, d) = l
	minnwt = a - b
	maxxwt = a + b
	minntot = c - d
	maxxtot = c + d
	minn = minnwt * n
	maxx = maxxwt * n
	if minntot <= minnwt * n <= maxxtot:
		return 'Yes'
	if minntot <= maxxwt * n <= maxxtot:
		return 'Yes'
	if minnwt * n > maxxtot or maxxwt * n < minntot:
		return 'No'
	return 'Yes'
T = int(input())
for _ in range(T):
	l = list(map(int, stdin.readline().rstrip().split()))
	print(solve(l))


t = int(input())
ans = []
for i in range(t):
	(n, a, b, c, d) = map(int, input().split())
	saidai = max(a + b, a - b)
	saisyou = min(a + b, a - b)
	zentai_saidai = max(c + d, c - d)
	zentai_saisyou = min(c + d, c - d)
	if saisyou * n <= zentai_saidai:
		if saidai * n >= zentai_saisyou:
			ans.append('Yes')
		else:
			ans.append('No')
	elif saidai * n >= zentai_saisyou:
		if saisyou * n <= zentai_saidai:
			ans.append('Yes')
		else:
			ans.append('No')
	else:
		ans.append('No')
for i in ans:
	print(i)


times = int(input())
while times:
	times -= 1
	(n, a, b, c, d) = map(int, input().split())
	flag = 0
	x1 = a - b
	x2 = a + b
	y1 = c - d
	y2 = c + d
	if x1 * n > y2 or x2 * n < y1:
		print('No')
	else:
		print('Yes')


for _ in range(int(input())):
	(n, a, b, c, d) = list(map(int, input().split()))
	x = c - d
	y = c + d
	z1 = n * (a - b)
	z2 = n * (a + b)
	if z1 > y or z2 < x:
		print('No')
	else:
		print('Yes')


import sys
pin = sys.stdin.readline
pout = sys.stdout.write
ran = range
m = int(pin())
mape = map
for i in ran(m):
	(n, a, b, c, d) = mape(int, pin().split())
	if n * (a - b) <= c + d and n * (a + b) >= c - d:
		print('Yes')
	else:
		print('No')


import io, os
import sys
from atexit import register
input = io.BytesIO(os.read(0, os.fstat(0).st_size)).readline
sys.stdout = io.BytesIO()
register(lambda : os.write(1, sys.stdout.getvalue()))
tokens = []
tokens_next = 0

def next_str():
	global tokens, tokens_next
	while tokens_next >= len(tokens):
		tokens = input().split()
		tokens_next = 0
	tokens_next += 1
	return tokens[tokens_next - 1]

def nextInt():
	return int(next_str())

def print(s):
	sys.stdout.write((str(s) + '\n').encode())
t = nextInt()
for _ in range(t):
	n = nextInt()
	a = nextInt()
	b = nextInt()
	c = nextInt()
	d = nextInt()
	grains = (n * (a - b), n * (a + b))
	limits = (c - d, c + d)
	if grains[0] > limits[1] or grains[1] < limits[0]:
		print('No')
	else:
		print('Yes')


def rice(n, a, b, c, d):
	lower = n * (a - b)
	upper = n * (a + b)
	if c + d < lower or c - d > upper:
		return 'No'
	return 'Yes'
t = int(input())
for i in range(t):
	x = list(map(int, input().rstrip().split()))
	print(rice(x[0], x[1], x[2], x[3], x[4]))


t = int(input())
for _ in range(t):
	(n, a, b, c, d) = map(int, input().split())
	l_b_s = c - d
	r_b_s = c + d
	l_b = (a - b) * n
	r_b = (a + b) * n
	if r_b_s <= r_b and r_b_s >= l_b:
		print('YES')
	elif l_b_s >= l_b and l_b_s <= r_b:
		print('YES')
	elif l_b_s <= l_b and r_b_s >= r_b:
		print('YES')
	else:
		print('NO')


t = int(input())
for i in range(0, t):
	(n, a, b, c, d) = list(map(int, input().split()))
	if n * (a - b) > c + d:
		print('No')
	elif n * (a + b) < c - d:
		print('No')
	else:
		print('YES')


t = int(input())
while t:
	(n, a, b, c, d) = map(int, input().split())
	k1 = (a - b) * n
	k2 = (a + b) * n
	if c - d <= k1 <= c + d or c - d <= k2 <= c + d or (k1 <= c - d and c + d <= k2):
		print('Yes')
	else:
		print('No')
	t -= 1


t = int(input())
for _ in range(t):
	(n, a, b, c, d) = [int(el) for el in input().split()]
	if not n * (a - b) > c + d and (not n * (a + b) < c - d):
		print('YES')
	else:
		print('NO')


def main():
	for tin in range(int(input())):
		(n, a, b, c, d) = map(int, input().split())
		x = a + b
		y = a - b
		u = c + d
		v = c - d
		if n * (a - b) <= c + d and n * (a + b) >= c - d:
			print('Yes')
		else:
			print('No')
main()


t = int(input())
while t > 0:
	(n, a, b, c, d) = input().split()
	(n, a, b, c, d) = (int(n), int(a), int(b), int(c), int(d))
	low = (a - b) * n
	high = (a + b) * n
	o = c - d
	p = c + d
	if low <= p and high >= o:
		print('Yes')
	else:
		print('No')
	t -= 1


t = int(input())
for _ in range(t):
	(n, a, b, c, d) = map(int, input().split())
	m1 = a - b
	m2 = a + b
	c1 = c - d
	c2 = c + d
	if n * m1 > c2 or n * m2 < c1:
		print('No')
	else:
		print('Yes')


for z in range(int(input())):
	(n, a, b, c, d) = map(int, input().split())
	vmin = a - b
	vmax = a + b
	smin = c - d
	smax = c + d
	if n * vmax < smin or n * vmin > smax:
		print('NO')
	else:
		print('YES')


t = int(input())
for i in range(t):
	(n, a, b, c, d) = list(map(int, input().split()))
	s = 0
	for x in range(a - b, a + b + 1):
		if n * x in range(c - d, c + d + 1):
			print('Yes')
			s += 1
			break
	if s != 1 and n * (a - b) < c - d and (n * (a + b) > c + d):
		print('Yes')
	elif s != 1:
		print('No')


t = int(input())
for _ in range(t):
	(n, a, b, c, d) = map(int, input().split())
	amax = n * (a + b)
	amin = n * (a - b)
	if amax >= c - d and amax <= c + d:
		print('YES')
	elif amin >= c - d and amin <= c + d:
		print('YES')
	elif amin <= c - d and amax >= c + d:
		print('YES')
	else:
		print('NO')


t = int(input())
for _ in range(t):
	(n, a, b, c, d) = map(int, input().split())
	x = n * (a - b)
	y = n * (a + b)
	u = c + d
	v = c - d
	if x > u or y < v:
		print('NO')
	else:
		print('YES')


for _ in range(int(input())):
	(n, a, b, c, d) = map(int, input().split())
	pkgmin = c - d
	pkgmax = c + d
	ttlmin = (a - b) * n
	ttlmax = (a + b) * n
	if pkgmax >= ttlmax and ttlmax >= pkgmin:
		print('Yes')
	elif pkgmax >= ttlmin and ttlmin >= pkgmin:
		print('Yes')
	elif ttlmax >= pkgmax and pkgmax >= ttlmin:
		print('Yes')
	elif ttlmax >= pkgmin and pkgmin >= ttlmin:
		print('Yes')
	else:
		print('No')


a = int(input())
for i in range(0, a):
	(n, a, b, c, d) = map(int, input().split())
	gs = a - b
	ge = a + b
	ss = c - d
	se = c + d
	if gs * n > se or ge * n < ss:
		print('NO')
	else:
		print('YES')


n = int(input())
for i in range(n):
	lis = []
	lis.extend(map(int, input().split()))
	a = lis[0]
	d = lis[-1]
	ma = lis[1] + lis[2]
	mi = lis[1] - lis[2]
	wa = lis[3] + lis[4]
	wb = lis[3] - lis[4]
	z = 0
	if a * ma < wb or a * mi > wa:
		print('No')
	else:
		print('Yes')


for _ in range(int(input())):
	(N, a, b, c, d) = map(int, input().split())
	minWt = (a - b) * N
	maxWt = (a + b) * N
	minAll = c - d
	maxAll = c + d
	ans = False
	if minWt >= minAll and minWt <= maxAll:
		ans = True
	if maxWt >= minAll and maxWt <= maxAll:
		ans = True
	if minWt <= minAll and minAll <= maxWt:
		ans = True
	if minWt <= maxAll and maxAll <= maxWt:
		ans = True
	print('Yes' if ans else 'No')


t = int(input())
for i in range(t):
	(n, a, b, c, d) = map(int, input().split())
	res = a - b
	res1 = a + b
	dop = c - d
	dop1 = c + d
	if res * n > dop1 or res1 * n < dop:
		print('No')
	else:
		print('Yes')


for _ in range(int(input())):
	(a, b, c, d, e) = map(int, input().split())
	(b, c) = (a * (b - c), a * (b + c))
	if b >= d - e and b <= d + e:
		print('YES')
	elif b <= d - e and c >= d + e:
		print('YES')
	elif c >= d - e and c <= d + e:
		print('YES')
	else:
		print('NO')


import sys
t = int(input())
inp = [line.strip().split() for line in reversed(sys.stdin.readlines())]
ans = []
while t:
	(n, a, b, c, d) = map(int, inp.pop())
	if n * (a - b) <= c + d and n * (a + b) >= c - d:
		ans.append('Yes')
	else:
		ans.append('No')
	t -= 1
print(*ans, sep='\n')


t = int(input())
for i in range(t):
	(n, a, b, c, d) = list(map(int, input().split()))
	smin = (a - b) * n
	smax = (a + b) * n
	wmin = c - d
	wmax = c + d
	l = max(smin, wmin)
	r = min(smax, wmax)
	if l > r:
		print('NO')
	else:
		print('YES')


for t in range(int(input())):
	(n, a, b, c, d) = [int(s) for s in input().split()]
	x = a - b
	y = a + b
	X = c - d
	Y = c + d
	if x * n > Y:
		print('No')
		continue
	if y * n < X:
		print('No')
		continue
	print('Yes')


for _ in range(int(input())):
	(n, a, b, c, d) = map(int, input().split())
	l = n * (a - b)
	r = n * (a + b)
	if r < c - d or c + d < l:
		print('NO')
	else:
		print('Yes')


t = int(input())
while t > 0:
	t -= 1
	inp = input().split(' ')
	inp = list(map(int, inp))
	n = int(inp[0])
	a = int(inp[1])
	b = int(inp[2])
	c = int(inp[3])
	d = int(inp[4])
	weigh = 0
	flag = False
	xi = range(n * (a - b), n * (a + b) + 1)
	wighi = range(c - d, c + d + 1)
	if len(range(max(xi[0], wighi[0]), min(xi[-1], wighi[-1]) + 1)) == 0:
		print('No')
	else:
		print('Yes')


T = int(input())
for t in range(T):
	(n, a, b, c, d) = list(map(int, input().strip().split(' ')))
	diff = abs(c - n * a)
	if n * b + d >= diff:
		print('Yes')
	else:
		print('No')


for _ in range(int(input().strip())):
	(n, a, b, c, d) = map(int, input().strip().split())
	t1 = n * (a - b)
	t2 = n * (a + b)
	t3 = c - d
	t4 = c + d
	if t4 < t1 or t3 > t2:
		print('No')
	else:
		print('Yes')


for _ in range(int(input())):
	(n, a, b, c, d) = map(int, input().split())
	sting = 'No'
	x = 0
	y = 0
	l = []
	if n * (a - b) > c + d or n * (a + b) < c - d:
		print('No')
	else:
		print('Yes')


(_sum, _range, _min, _int, _max) = (sum, range, min, int, max)

def solution():
	for _ in _range(_int(input())):
		(n, a, b, c, d) = [_int(i) for i in input().split()]
		_min = c - d
		_max = c + d
		_sum_min = (a - b) * n
		_sum_max = (a + b) * n
		if _min <= _sum_min <= _max:
			print('Yes')
			continue
		if _min <= _sum_max <= _max:
			print('Yes')
			continue
		if _sum_min <= _min <= _sum_max or _sum_min <= _max <= _sum_max:
			print('Yes')
			continue
		print('No')
solution()


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

def solve():
	(n, a, b, c, d) = RA()
	pa = (a - b) * n
	pb = (a + b) * n
	sa = c - d
	sb = c + d
	if sa <= pa and pa <= sb or (sa <= pb and pb <= sb) or (pa <= sa and sb <= pb):
		print('Yes')
	else:
		print('No')
t = int(input())
for i in range(t):
	solve()


import math
t = int(input(''))
while t > 0:
	flag = 0
	(n, a, b, c, d) = map(int, input().split())
	for i in range(c - d, c + d + 1):
		if i / n >= a - b and i / n <= a + b:
			flag = 1
	if flag == 1:
		print('Yes')
	else:
		print('No')
	t -= 1


n = int(input())
ans = []
for i in range(n):
	(number, a, b, c, d) = [int(x) for x in input().split(' ')]
	if (a - b) * number <= c + d and (a + b) * number >= c - d:
		ans.append('YES')
	else:
		ans.append('NO')
for j in range(n):
	print(ans[j])


import math
t = int(input())
for _ in range(t):
	(n, a, b, c, d) = map(int, input().split())
	mi = n * (a - b)
	ma = n * (a + b)
	if c + d < mi or c - d > ma:
		print('No')
	else:
		print('Yes')


t = int(input())
for i in range(t):
	(n, a, b, c, d) = list(map(int, input().split()))
	print(['No', 'Yes'][c - d <= n * (a - b) <= c + d or c - d <= n * (a + b) <= c + d or (n * (a - b) <= c - d and n * (a + b) >= c + d)])


from sys import stdin, stdout
t = int(stdin.readline())
for p in range(t):
	(n, a, b, c, d) = map(int, stdin.readline().split())
	a1 = abs(a - b)
	b1 = a + b
	c1 = abs(c - d)
	d1 = c + d
	if a1 * n <= d1 and b1 * n >= c1:
		stdout.write('Yes')
	else:
		stdout.write('No')
	if p != t - 1:
		stdout.write('\n')


t = int(input())
while t:
	(n, a, b, c, d) = [int(x) for x in input().split()]
	x2 = (a + b) * n
	x1 = (a - b) * n
	if x2 < c - d or x1 > c + d:
		print('NO')
	else:
		print('YES')
	t -= 1


for _ in range(int(input())):
	(n, a, b, c, d) = map(int, input().split())
	l = a - b
	h = a + b
	l2 = c - d
	h2 = c + d
	if l * n > h2:
		print('No')
	elif h * n < l2:
		print('No')
	else:
		print('Yes')


import math as mt
for _ in range(int(input())):
	(n, a, b, c, d) = [int(j) for j in input().split()]
	if (a - b) * n > c + d or (a + b) * n < c - d:
		print('No')
	else:
		flag = 0
		lr = c - d
		ur = c + d
		for i in range((a - b) * n, (a + b) * n + 1):
			if i in range(lr, ur + 1):
				print('Yes')
				flag = 1
				break
		if not flag:
			print('No')


def main():
	t = int(input())
	for _ in range(t):
		(n, a, b, c, d) = map(int, input().split())
		lower_case = (a - b) * n
		upper_case = (a + b) * n
		if lower_case <= c + d and c - d <= upper_case:
			print('Yes')
		else:
			print('No')
main()


def solve(n, a, b, c, d):
	if n * (a - b) > c + d or n * (a + b) < c - d:
		return 'No'
	else:
		return 'Yes'
for t in range(int(input())):
	(n, a, b, c, d) = [int(i) for i in input().split(' ')]
	print(solve(n, a, b, c, d))


import sys
T = int(sys.stdin.readline())
for i in range(T):
	[n, a, b, c, d] = [int(j) for j in sys.stdin.readline().split()]
	c1 = (a + b) * n < c - d
	c2 = (a - b) * n > c + d
	if c1 or c2:
		print('No')
	else:
		print('Yes')


for _ in range(int(input())):
	(n, a, b, c, d) = map(int, input().split())
	(mnt, mxt) = ((a - b) * n, (a + b) * n)
	(mnp, mxp) = (c - d, c + d)
	print('Yes' if mnt <= mxp and mxt >= mnp else 'No')


from sys import stdin, stdout
import math
import heapq
t = 1

def aint():
	return int(input().strip())

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

def fint():
	return list(map(int, stdin.readline().split()))

def main():
	(n, a, b, c, d) = lint()
	if n * (a + b) >= c - d and n * (a - b) <= c + d:
		print('Yes')
	else:
		print('No')
t = int(input())
for i in range(t):
	main()


t = int(input())
for q in range(t):
	(n, a, b, c, d) = map(int, input().split())
	(s1, s2, s3, s4) = ((a - b) * n, (a + b) * n, c - d, c + d)
	if s1 > s4 or s2 < s3:
		print('No')
	else:
		print('Yes')


import math
for w in range(int(input())):
	(x, y, u, i, o) = list(map(int, input().split()))
	if x * (y - u) > i + o:
		print('No')
	elif x * (y + u) < i - o:
		print('No')
	else:
		print('Yes')


import io
import os
from collections import Counter, defaultdict, deque

def solve(N, A, B, C, D):
	mn = (A - B) * N
	mx = (A + B) * N
	if not (C + D < mn or mx < C - D):
		return 'Yes'
	return 'No'
input = io.BytesIO(os.read(0, os.fstat(0).st_size)).readline
T = int(input())
for t in range(T):
	(N, A, B, C, D) = [int(x) for x in input().split()]
	ans = solve(N, A, B, C, D)
	print(ans)


from sys import stdin, stdout
import math
from itertools import permutations, combinations
from collections import defaultdict
from bisect import bisect_left
from bisect import bisect_right

def L():
	return list(map(int, stdin.readline().split()))

def In():
	return map(int, stdin.readline().split())

def I():
	return int(stdin.readline())
P = 1000000007

def main():
	for t in range(I()):
		(n, a, b, c, d) = In()
		flag = 0
		for i in range(c - d, c + d + 1):
			x = i // n
			y = i % n
			if x >= a - b and x <= a + b:
				sm = (a + b - x) * n
				if y <= sm:
					flag = 1
					break
			if flag:
				break
		if flag:
			print('Yes')
		else:
			print('No')
main()


t = int(input())
for _ in range(t):
	numbers = list(map(int, input().split()))
	first_negative = numbers[1] - numbers[2]
	second_negative = numbers[3] - numbers[4]
	first_positive = numbers[1] + numbers[2]
	second_positive = numbers[3] + numbers[4]
	if numbers[0] * first_negative > second_positive or numbers[0] * first_positive < second_negative:
		print('No')
	else:
		print('Yes')


t = int(input())
for _ in range(t):
	l = list(map(int, input().split()))
	n = l[0]
	a = l[1]
	b = l[2]
	c = l[3]
	d = l[4]
	mnw = (a - b) * n
	mxw = (a + b) * n
	txw = c + d
	tnw = c - d
	if mxw < tnw or mnw > txw:
		print('NO')
	else:
		print('YES')


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

def list_input():
	return list(num_input())
for _ in range(int(input())):
	flag = True
	(n, a, b, c, d) = num_input()
	if (a - b) * n > c + d or (a + b) * n < c - d:
		print('NO')
	else:
		print('YES')


def solve(n, a, b, c, d):
	mn = n * (a - b)
	mx = n * (a + b)
	if mx < c - d or mn > c + d:
		print('NO')
	else:
		print('YES')
	pass
q = int(input())
while q:
	(n, a, b, c, d) = map(int, input().split())
	q -= 1
	solve(n, a, b, c, d)


def solve(n, a, b, c, d):
	mn1 = n * (a - b)
	mx1 = n * (a + b)
	if mn1 >= c - d and mn1 <= c + d:
		print('Yes')
		return
	if mx1 >= c - d and mx1 <= c + d:
		print('Yes')
		return
	if mn1 < c - d and mx1 > c + d:
		print('Yes')
		return
	print('No')
T = int(input())
for i in range(T):
	(n, a, b, c, d) = [int(x) for x in input().split(' ')]
	solve(n, a, b, c, d)


MOD = 10 ** 9 + 7

def main():
	for _ in inputt():
		(n, a, b, c, d) = inputi()
		if abs(c - n * a) <= n * b + d:
			print('YES')
		else:
			print('NO')
from math import *
from heapq import *
from itertools import *
from functools import reduce, lru_cache, partial
from collections import Counter, defaultdict
import re, copy, operator, cmath
import sys, io, os, builtins
sys.setrecursionlimit(1000)
BUFSIZE = 8192

class FastIO(io.IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = io.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(io.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')

def print(*args, **kwargs):
	sys.stdout.write(kwargs.pop('split', ' ').join(map(str, args)))
	sys.stdout.write(kwargs.pop('end', '\n'))
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip()
inputt = lambda t=0: range(t) if t else range(int(input()))
inputs = lambda : input().split()
inputi = lambda : map(int, inputs())
inputl = lambda t=0, k=inputi: map(list, (k() for _ in range(t))) if t else list(k())

def len(a):
	if isinstance(a, range):
		return -((a.start - a.stop) // a.step)
	return builtins.len(a)

def bisect_left(a, x, key=None, lo=0, hi=None):
	if lo < 0:
		lo = 0
	if hi == None:
		hi = len(a)
	if key == None:
		key = do_nothing
	while lo < hi:
		mid = (lo + hi) // 2
		if key(a[mid]) < x:
			lo = mid + 1
		else:
			hi = mid
	return lo

def bisect_right(a, x, key=None, lo=0, hi=None):
	if lo < 0:
		lo = 0
	if hi == None:
		hi = len(a)
	if key == None:
		key = do_nothing
	while lo < hi:
		mid = (lo + hi) // 2
		if x < key(a[mid]):
			hi = mid
		else:
			lo = mid + 1
	return lo

def insort_left(a, x, key=None, lo=0, hi=None):
	lo = bisect_left(a, x, key, lo, hi)
	a.insert(lo, x)

def insort_right(a, x, key=None, lo=0, hi=None):
	lo = bisect_right(a, x, key, lo, hi)
	a.insert(lo, x)
do_nothing = lambda x: x
bisect = bisect_right
insort = insort_right

def index(a, x, default=None, key=None, lo=0, hi=None):
	if lo < 0:
		lo = 0
	if hi == None:
		hi = len(a)
	if key == None:
		key = do_nothing
	i = bisect_left(a, x, key, lo, hi)
	if lo <= i < hi and key(a[i]) == x:
		return a[i]
	if default != None:
		return default
	raise ValueError

def find_lt(a, x, default=None, key=None, lo=0, hi=None):
	if lo < 0:
		lo = 0
	if hi == None:
		hi = len(a)
	i = bisect_left(a, x, key, lo, hi)
	if lo < i <= hi:
		return a[i - 1]
	if default != None:
		return default
	raise ValueError

def find_le(a, x, default=None, key=None, lo=0, hi=None):
	if lo < 0:
		lo = 0
	if hi == None:
		hi = len(a)
	i = bisect_right(a, x, key, lo, hi)
	if lo < i <= hi:
		return a[i - 1]
	if default != None:
		return default
	raise ValueError

def find_gt(a, x, default=None, key=None, lo=0, hi=None):
	if lo < 0:
		lo = 0
	if hi == None:
		hi = len(a)
	i = bisect_right(a, x, key, lo, hi)
	if lo <= i < hi:
		return a[i]
	if default != None:
		return default
	raise ValueError

def find_ge(a, x, default=None, key=None, lo=0, hi=None):
	if lo < 0:
		lo = 0
	if hi == None:
		hi = len(a)
	i = bisect_left(a, x, key, lo, hi)
	if lo <= i < hi:
		return a[i]
	if default != None:
		return default
	raise ValueError
main()


t = int(input())
for ig in range(t):
	(n, a, b, c, d) = map(int, input().split())
	mins = a - b
	maxs = a + b
	mint = c - d
	maxt = c + d
	if mins * n > maxt or maxs * n < mint:
		print('NO')
	else:
		print('YES')


t = int(input())
for i in range(0, t):
	(n, a, b, c, d) = input().split()
	n = int(n)
	a = int(a)
	b = int(b)
	c = int(c)
	d = int(d)
	s1 = (a + b) * n
	s2 = (a - b) * n
	if s1 < c - d or s2 > c + d:
		print('NO')
	else:
		print('YES')


import math
from collections import defaultdict
ml = lambda : map(int, input().split())
ll = lambda : list(map(int, input().split()))
ii = lambda : int(input())
ip = lambda : input()
t = ii()
for _ in range(t):
	(n, a, b, c, d) = ml()
	if (a + b) * n >= c - d and (a - b) * n <= c + d:
		print('YES')
	else:
		print('NO')


t = int(input())
for _ in range(t):
	(n, a, b, c, d) = map(int, input().split())
	g = 0
	for i in range(c - d, c + d + 1):
		if (a - b) * n <= i <= (a + b) * n:
			g = 1
			break
	print('Yes' if g else 'No')


for _ in range(int(input())):
	(n, a, b, c, d) = map(int, input().split())
	na = n * (a - b)
	nb = (a + b) * n
	nc = c - d
	nd = c + d
	if nc > na and nc > nb or (nd < na and nd < nb):
		print('NO')
	else:
		print('YES')


t = int(input())
for dobpt in range(t):
	(n, a, b, c, d) = map(int, input().split())
	x = (a - b) * n
	y = (a + b) * n
	if y < c - d or x > c + d:
		print('No')
	else:
		print('Yes')


for x in range(int(input())):
	(n, a, b, c, d) = map(int, input().split())
	ab = n * (a - b)
	bc = n * (a + b)
	if ab > c + d:
		print('No')
	elif bc < c - d:
		print('No')
	else:
		print('Yes')


for i in range(int(input())):
	(a, b, c, d, e) = map(int, input().split())
	if (b - c) * a <= d + e and (b + c) * a >= d - e:
		print('Yes')
	else:
		print('No')


from sys import *
import collections
import math
t = int(stdin.readline())
for _ in range(t):
	(n, a, b, c, d) = list(map(int, stdin.readline().split(' ')))
	mx = n * (a + b)
	mn = n * (a - b)
	if mn > c + d:
		print('No')
		continue
	if mx < c - d:
		print('No')
		continue
	print('Yes')


t = int(input())
for _ in range(t):
	(n, a, b, c, d) = list(map(int, input().split()))
	gl = (a - b) * n
	gr = (a + b) * n
	cl = c - d
	cr = c + d
	if not (gr < cl or cr < gl):
		print('Yes')
	else:
		print('No')


import sys
try:
	sys.stdin = open('input.txt', 'r')
	sys.stdout = open('output.txt', 'w')
except:
	pass
input = sys.stdin.readline
for _ in range(int(input())):
	(n, a, b, c, d) = map(int, input().split())
	minr = a - b
	maxr = a + b
	minn = n * minr
	maxx = n * maxr
	cmin = c - d
	cmax = c + d
	if maxx < cmin or cmax < minn:
		print('NO')
	else:
		print('YES')


t = int(input())
for i in range(t):
	l = list(map(int, input().split(' ')))
	n = l[0]
	a = l[1]
	b = l[2]
	c = l[3]
	d = l[4]
	l1 = (a - b) * n
	r1 = (a + b) * n
	l2 = c - d
	r2 = c + d
	if r1 < l2 or l1 > r2:
		print('No')
	else:
		print('Yes')


t = int(input())
for i in range(t):
	(n, a, b, c, d) = list(map(int, input().split()))
	r1 = a - b
	r2 = a + b
	r3 = c - d
	r4 = c + d
	if r1 * n > r4 or r2 * n < r3:
		print('No')
	else:
		print('Yes')


test = int(input())
for t in range(test):
	(n, a, b, c, d) = map(int, input().split())
	flag = 0
	l = n * (a - b)
	r = n * (a + b)
	wmin = c - d
	wmax = c + d
	if r < wmin or l > wmax:
		print('No')
	else:
		print('Yes')


from math import factorial as fac
from collections import defaultdict
from copy import deepcopy
import sys, math
f = None
try:
	f = open('q1.input', 'r')
except IOError:
	f = sys.stdin
sys.setrecursionlimit(10 ** 6)

def print_case_iterable(case_num, iterable):
	print('Case #{}: {}'.format(case_num, ' '.join(map(str, iterable))))

def print_case_number(case_num, iterable):
	print('Case #{}: {}'.format(case_num, iterable))

def print_iterable(A):
	print(' '.join(A))

def read_int():
	return int(f.readline())

def read_int_array():
	return [int(x) for x in f.readline().strip().split(' ')]

def rns():
	a = [x for x in f.readline().split(' ')]
	return (int(a[0]), a[1].strip())

def read_string():
	return list(f.readline().strip())
NUMBER = 10 ** 9 + 7

def factorial(n):
	M = NUMBER
	f = 1
	for i in range(1, n + 1):
		f = f * i % M
	return f

def mult(a, b):
	return a * b % NUMBER

def minus(a, b):
	return (a - b) % NUMBER

def plus(a, b):
	return (a + b) % NUMBER

def egcd(a, b):
	if a == 0:
		return (b, 0, 1)
	else:
		(g, y, x) = egcd(b % a, a)
		return (g, x - b // a * y, y)

def modinv(a):
	m = NUMBER
	(g, x, y) = egcd(a, m)
	if g != 1:
		raise Exception('modular inverse does not exist')
	else:
		return x % m
from collections import deque, defaultdict
import heapq

def bfs(V, E):
	s = set()
	print('\n'.join(map(str, E.items())))
	cnt = 0
	for v in V:
		if v in s:
			continue
		q = deque([])
		s.add(v)
		q.append(v)
		while len(q) > 0:
			x = q.popleft()
			for e in E[x]:
				if e not in s:
					s.add(e)
					q.append(e)
			print(q)
		cnt += 1
	return cnt
from typing import List, Tuple

def regular_bs(L, x, l=None, r=None):
	l = 0 if l == None else l
	r = len(L) if r == None else r
	while r - l > 1:
		m = (r + l) // 2
		l = m if L[m] <= x else l
		r = m if L[m] > x else r
	cnt = 0
	return l

def binary_count_smaller(L, x):
	l = 0
	if x < L[0]:
		return 0
	r = len(L)
	while r - l > 1:
		mid = (l + r) // 2
		if L[mid] < x:
			l = mid
		else:
			r = mid
	return l + 1

def binary_count_larger(L, x):
	l = 0
	if x > L[-1]:
		return 0
	r = len(L)
	while r - l > 1:
		mid = (l + r) // 2
		if L[mid] <= x:
			l = mid
		else:
			r = mid
	return len(L) - (r - 1)

def solution(L):
	(n, a, b, c, d) = L
	if (a - b) * n <= c + d and (a + b) * n >= c - d:
		return 'Yes'
	return 'No'

def main():
	T = read_int()
	for i in range(T):
		L = read_int_array()
		print(solution(L))
main()


for i in range(int(input())):
	(n, a, b, c, d) = map(int, input().split())
	each_grain = [n * (a - b), n * (a + b)]
	tot_wt = [c - d, c + d]
	if each_grain[1] < tot_wt[0] or each_grain[0] > tot_wt[1]:
		print('No')
	else:
		print('Yes')


for _ in range(int(input())):
	(n, a, b, c, d) = map(int, input().split())
	high = n * (a + b)
	low = n * (a - b)
	act_high = c + d
	act_low = c - d
	if high >= act_low and low <= act_high:
		print('YES')
	else:
		print('NO')


numcases = int(input())
for i in range(numcases):
	(n, a, b, c, d) = map(int, input().split())
	glo = n * (a - b)
	ghi = n * (a + b)
	plo = c - d
	phi = c + d
	if phi < glo or plo > ghi:
		print('No')
	else:
		print('Yes')


from sys import stdin

def solve(n, a, b, c, d):
	l = n * (a - b)
	h = n * (a + b)
	if h < c - d or l > c + d:
		print('No')
	else:
		print('Yes')

def main():
	inp = stdin.readline
	for _ in range(int(inp())):
		(n, a, b, c, d) = map(int, inp().split())
		solve(n, a, b, c, d)
main()


count = int(input())
while count > 0:
	(n, a, b, c, d) = map(int, input().split())
	if c + d < n * (a - b) or c - d > n * (a + b):
		print('no')
	else:
		print('yes')
	count -= 1


def call():
	(n, a, b, c, d) = map(int, input().split())
	left = n * (a - b)
	right = n * (a + b)
	if right < c - d or c + d < left:
		print('NO')
	else:
		print('YES')
for i in range(int(input())):
	call()


t = int(input())

def intersetction(l1, r1, l2, r2):
	l = max(l1, l2)
	r = min(r1, r2)
	return r - l
for _ in range(t):
	(n, a, b, c, d) = map(int, input().split())
	if intersetction(n * (a - b), n * (a + b), c - d, c + d) >= 0:
		print('Yes')
	else:
		print('No')


for f in range(int(input())):
	(n, a, b, c, d) = map(int, input().split())
	if n * (a - b) <= c + d and n * (a + b) >= c - d:
		print('YES')
	else:
		print('NO')


test_cases = int(input())

def is_consistent(weight, possible_weight):
	return weight in possible_weight
for i in range(test_cases):
	(weight, a, b, c, d) = map(int, input().split(' '))
	if weight * (a + b) < c - d or weight * (a - b) > c + d:
		print('No')
	else:
		print('Yes')


for _ in range(int(input())):
	(n, a, b, c, d) = map(int, input().split())
	flag = 0
	r = a - b
	x = a + b
	minW = (a - b) * n
	maxW = (a + b) * n
	if minW < c - d and maxW < c - d or (minW > c + d and maxW > c + d):
		print('No')
	else:
		print('Yes')


t = int(input())
for i in range(t):
	l = list(map(int, input().split()))
	n = l[0]
	a = l[1]
	b = l[2]
	c = l[3]
	d = l[4]
	r1 = n * (a - b)
	r2 = n * (a + b)
	d1 = c - d
	d2 = c + d
	if r1 <= d1 <= r2:
		print('YES')
	elif r1 <= d2 <= r2:
		print('YES')
	elif d1 <= r1 <= d2:
		print('YES')
	elif d1 <= r1 and d2 >= r2:
		print('YES')
	else:
		print('NO')


t = int(input())
for _ in range(t):
	(n, a, b, c, d) = input().split()
	(n, a, b, c, d) = (int(n), int(a), int(b), int(c), int(d))
	low = a - b
	high = a + b
	ans = 'NO'
	r1 = c - d
	r2 = c + d
	if high * n < r1 or low * n > r2:
		ans = 'NO'
	else:
		ans = 'YES'
	print(ans)


no = int(input())
res = []
for i in range(no):
	(n, a, b, c, d) = map(int, input().split())
	low = n * (a - b)
	upp = n * (a + b)
	pac_low = c - d
	pac_high = c + d
	if upp < c - d or c + d < low:
		res.append('No')
	else:
		res.append('Yes')
for i in res:
	print(i)


for _ in range(int(input())):
	(n, a, b, c, d) = map(int, input().split())
	maxi = n * (a + b)
	mini = n * (a - b)
	tot_m = c + d
	tot_mi = c - d
	if maxi >= tot_m and mini <= tot_m and (mini >= tot_mi):
		print('Yes')
	elif maxi >= tot_mi and tot_m >= maxi:
		print('Yes')
	elif maxi >= tot_m and tot_mi >= mini:
		print('Yes')
	elif tot_m > maxi and tot_mi <= mini:
		print('Yes')
	else:
		print('No')


t = 0
try:
	t = int(input())
except:
	pass
for _ in range(t):
	(n, a, b, c, d) = map(int, input().split())
	w = a - b
	x = a + b
	y = c - d
	z = c + d
	if w * n <= z and x * n >= y:
		print('Yes')
	else:
		print('No')


def solution():
	(n, a, b, c, d) = map(int, input().split())
	l = c - d
	r = c + d
	mi = a - b
	mx = a + b
	if n * mi <= r and n * mx >= l:
		print('YES')
	else:
		print('NO')
for _ in range(int(input())):
	solution()


t = int(input())
for _ in range(t):
	(n, a, b, c, d) = map(int, input().split())
	ind_low = n * (a - b)
	ind_high = n * (a + b)
	net_low = c - d
	net_high = c + d
	if ind_low > net_high or ind_high < net_low:
		print('No')
	else:
		print('Yes')


nd = int(input())
for i in range(0, nd):
	p = input().rstrip().split(' ')
	n = int(p[0])
	a = int(p[1])
	b = int(p[2])
	c = int(p[3])
	d = int(p[4])
	A = a - b
	B = a + b
	C = c - d
	D = c + d
	if A * n >= C and A * n <= D:
		print('YES')
	elif B * n >= C and B * n <= D:
		print('YES')
	else:
		V = A * n
		G = B * n
		GD = 0
		for j in range(C, D + 1):
			if j >= V and j <= G:
				print('YES')
				GD = 1
				break
		if GD == 0:
			print('NO')


def solve():
	(n, a, b, c, d) = map(int, input().split())
	mina = a - b
	maxa = a + b
	minc = c - d
	maxc = c + d
	d = mina * n
	if d < minc:
		d1 = minc - d
		if d1 <= 2 * b * n:
			print('Yes')
		else:
			print('No')
	elif d <= maxc:
		print('Yes')
	else:
		print('No')
t = int(input())
for i in range(t):
	solve()


t = int(input())
for i in range(t):
	(n, a, b, c, d) = input().split()
	n = int(n)
	a = int(a)
	b = int(b)
	c = int(c)
	d = int(d)
	mn1 = (a - b) * n
	mx1 = (a + b) * n
	mn2 = c - d
	mx2 = c + d
	if mn1 > mx2 or mx1 < mn2:
		print('No')
	else:
		print('Yes')


def f(n, a, b, c, d):
	totalmin = c - d
	totalmax = c + d
	grainmin = a - b
	grainmax = a + b
	if totalmin / n > grainmax:
		print('NO')
	elif totalmax / n < grainmin:
		print('NO')
	else:
		print('YES')
t = int(input())
for i in range(t):
	(n, a, b, c, d) = map(int, input().split())
	f(n, a, b, c, d)


from sys import stdin, exit
input = stdin.readline

def i():
	return input()

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

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

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

def print_array(a):
	print(' '.join(map(str, a)))
t = ii()
for _ in range(t):
	(n, a, b, c, d) = iis()
	can = False
	if (a + b) * n >= c - d and (a - b) * n <= c + d:
		can = True
	if can:
		print('Yes')
	else:
		print('No')


t = int(input())
for i in range(t):
	(n, a, b, c, d) = [int(k) for k in input().split()]
	t1 = (a - b) * n
	t2 = (a + b) * n
	(c, d) = (c - d, c + d)
	if t2 < c or t1 > d:
		print('No')
	else:
		print('Yes')


for _ in range(int(input())):
	(n, a, b, c, d) = map(int, input().split(' '))
	e1 = a - b
	e2 = a + b
	f1 = c - d
	f2 = c + d
	if e1 * n > f2 or e2 * n < f1:
		print('No')
	else:
		print('Yes')


for _ in range(int(input())):
	(n, a, b, c, d) = map(int, input().split())
	maxposs = n * (a + b)
	minposs = n * (a - b)
	ans = 'Yes'
	if minposs > c + d or maxposs < c - d:
		ans = 'No'
	print(ans)


t = int(input())
for _ in range(t):
	(n, a, b, c, d) = [int(z) for z in input().split()]
	minn = n * (a - b)
	maxx = n * (a + b)
	if minn > c + d or maxx < c - d:
		print('No')
	else:
		print('Yes')


t = int(input())
for _ in range(t):
	(n, a, b, c, d) = (int(x) for x in input().split())
	r1 = [(a - b) * n, (a + b) * n]
	r2 = [c - d, c + d]
	if r1[0] > r2[1]:
		print('No')
	elif r1[1] < r2[0]:
		print('No')
	else:
		print('Yes')


import sys
input = sys.stdin.readline
t = int(input())
while t > 0:
	t -= 1
	(n, a, b, c, d) = map(int, input().split())
	flag = 0
	for i in range(c - d, c + d + 1):
		if a - b <= i / n <= a + b:
			flag = 1
			break
	print('Yes' if flag else 'No')


t = int(input())
for _ in range(t):
	(n, a, b, c, d) = map(int, input().split())
	if max(n * (a - b), c - d) <= min(n * (a + b), c + d):
		print('YES')
	else:
		print('NO')


t = int(input())
for _ in range(t):
	(n, a, b, c, d) = map(int, input().strip().split())
	ming = abs(a - b) * n
	maxg = (a + b) * n
	minpack = abs(c - d)
	maxpack = c + d
	if ming > maxpack:
		print('No')
	elif maxg < minpack:
		print('No')
	elif ming >= minpack or ming <= maxpack:
		print('Yes')
	else:
		print('Yes')


t = int(input())
for _ in range(t):
	(n, a, b, c, d) = map(int, input().split())
	z = 1
	for i in range(c - d, c + d + 1):
		if i / n >= a - b and i / n <= a + b:
			print('Yes')
			z = 0
			break
	if z:
		print('No')


T = int(input())
for test in range(T):
	(N, A, B, C, D) = list(map(int, input().split()))
	(lowerbound, upperbound) = (N * (A - B), N * (A + B))
	if lowerbound > C + D or upperbound < C - D:
		print('No')
	else:
		print('Yes')


for _ in range(int(input())):
	(n, a, b, c, d) = map(int, input().split())
	la = (a - b) * n
	ra = (b + a) * n
	lc = c - d
	rc = d + c
	if la <= lc <= ra or la <= rc <= ra or (lc < la and rc > ra):
		print('Yes')
	else:
		print('No')


from math import *
from bisect import bisect_left, bisect_right
from queue import Queue
from sys import stdin, stdout
from collections import Counter
input = lambda : stdin.readline().strip()
fast_print = stdout.write
t = int(input())
for _ in range(t):
	(n, a, b, c, d) = map(int, input().split())
	if c - d <= (a - b) * n <= c + d or c - d <= (a + b) * n <= c + d or ((a - b) * n <= c - d and (a + b) * n >= c + d):
		fast_print('Yes\n')
	else:
		fast_print('No\n')


t = int(input())
while t > 0:
	(n, a, b, c, d) = map(int, input().split())
	m1 = abs(a - b)
	m2 = abs(a + b)
	m3 = abs(c - d)
	m4 = abs(c + d)
	h = 0
	for i in range(m3, m4 + 1):
		ans = i / n
		if ans >= m1 and ans <= m2:
			h = 1
			print('Yes')
			break
	if h == 0:
		print('No')
	t = t - 1


t = int(input())
x = []
for i in range(t):
	x.append(list(map(int, input().strip().split()))[:5])
for i in range(t):
	(n, a, b, c, d) = x[i]
	if (a - b) * n <= c + d and (a + b) * n >= c - d or ((a - b) * n >= c - d and (a + b) * n <= c + d):
		print('Yes')
	else:
		print('No')


for i in range(int(input())):
	(n, a, b, c, d) = map(int, input().split())
	max_wt = (a + b) * n
	min_wt = (a - b) * n
	calculated_minwt = c - d
	calculated_maxwt = c + d
	if min_wt > calculated_maxwt:
		print('NO')
	elif max_wt < calculated_minwt:
		print('NO')
	else:
		print('YES')


import sys
input = sys.stdin.readline
t = int(input())
for i1 in range(t):
	(n, a, b, c, d) = list(map(int, input().split(' ')))
	curr = n * (a - b)
	right = c + d
	left = c - d
	if left <= curr <= right:
		print('Yes')
	elif curr > right:
		print('No')
	else:
		rem = left - curr
		if rem <= n * 2 * b:
			print('Yes')
		else:
			print('No')


T = int(input())
for i in range(T):
	(n, a, b, c, d) = [int(x) for x in input().split()]
	if abs(a - b) * n <= c + d and abs(a - b) * n >= c - d or ((a + b) * n <= c + d and (a + b) * n >= c - d) or ((a - b) * n <= c - d and (a + b) * n >= c + d):
		print('YES')
	else:
		print('NO')


from sys import stdin
a = int(stdin.readline())
for k in range(0, a):
	b = stdin.readline().split()
	c = int(b[0])
	d = int(b[1])
	e = int(b[2])
	f = int(b[3])
	g = int(b[4])
	A = c * (d - e)
	B = c * (d + e)
	C = f - g
	D = f + g
	if A > D or B < C:
		print('No')
	else:
		print('Yes')


import sys
input = sys.stdin.readline
from collections import defaultdict as dd
t = int(input())
while t:
	(n, a, b, c, d) = map(int, input().split())
	le = n * (a - b)
	ri = n * (a + b)
	if ri < c - d or le > c + d:
		print('No')
	else:
		print('Yes')
	t -= 1


def solve(n, a, b, c, d):
	minVal = a - b
	maxVal = a + b
	minSum = c - d
	maxSum = c + d
	if minVal * n > maxSum or maxVal * n < minSum:
		print('No')
	else:
		print('Yes')

def main():
	t = int(input())
	for i in range(t):
		(n, a, b, c, d) = list(map(int, input().split()))
		solve(n, a, b, c, d)
main()


from collections import Counter
from _collections import defaultdict
import math
rs = lambda : input().strip()
ri = lambda : int(input())
rl = lambda : list(map(int, input().split()))
rls = lambda : list(map(str, input().split()))
t = int(input())
for _ in range(0, t):
	(n, a, b, c, d) = list(map(int, input().split()))
	x = (a - b) * n
	if x > c + d:
		print('No')
		continue
	y = (a + b) * n
	if y < c - d:
		print('No')
		continue
	print('Yes')


def sol(n, a, b, c, d):
	w = a - b
	x = a + b
	y = c - d
	z = c + d
	if n * w > z or n * x < y:
		print('No')
	else:
		print('Yes')
for _ in range(int(input())):
	(n, a, b, c, d) = map(int, input().split())
	sol(n, a, b, c, d)


t = int(input())
for i in range(t):
	(n, a, b, c, d) = map(int, input().split())
	inc = n * 2 * b
	cw = n * (a - b)
	if c - d <= cw <= c + d:
		print('Yes')
	elif n * (a - b) > c + d or n * (a + b) < c - d:
		print('No')
	elif c - d - cw <= inc:
		print('Yes')
	else:
		print('No')


for tt in range(int(input())):
	(n, a, b, c, d) = map(int, input().split())
	if (a - b) * n > c + d:
		print('No')
		continue
	if (a + b) * n < c - d:
		print('No')
		continue
	print('Yes')


t = int(input())
while t > 0:
	t = t - 1
	(n, a, b, c, d) = map(int, input().split())
	p = n * (a - b)
	q = n * (a + b)
	r = c - d
	s = c + d
	f = 0
	if p > s or q < r:
		f = 1
	if f == 1:
		print('NO')
	else:
		print('YES')


T = int(input())
while T:
	(n, a, b, c, d) = map(int, input().split())
	x1 = a - b
	x2 = a + b
	y1 = c - d
	y2 = c + d
	F = 'Yes'
	if y2 < x1 * n or y1 > x2 * n:
		F = 'No'
	print(F)
	T = T - 1


def check(n, a, b, c, d):
	diff1 = (a - b) * n
	add1 = (a + b) * n
	diff2 = c - d
	add2 = c + d
	if add1 < diff2:
		return 'No'
	elif diff1 > add2:
		return 'No'
	return 'Yes'
t = int(input())
while t:
	(n, a, b, c, d) = list(map(int, input().split()))
	print(check(n, a, b, c, d))
	t -= 1


t = int(input())
for _ in range(t):
	(n, a, b, c, d) = list(map(int, input().split()))
	low = n * (a - b)
	high = n * (a + b)
	if high < c - d or low > c + d:
		print('NO')
	else:
		print('YES')


import sys, math
t = int(sys.stdin.readline())
for T in range(t):
	(n, a, b, c, d) = map(int, sys.stdin.readline().split())
	p = (a - b) * n
	q = (a + b) * n
	r = c - d
	s = c + d
	if (p <= s and p >= r or (q <= s and q >= r)) or (p <= r and q >= s):
		print('Yes')
	else:
		print('No')


from pprint import pprint
import sys
input = sys.stdin.readline
q = int(input())
for _ in range(q):
	(n, a, b, c, d) = map(int, input().split())
	weightL = (a - b) * n
	weightR = (a + b) * n
	totalL = c - d
	totalR = c + d
	if totalL <= weightL <= totalR or totalL <= weightR <= totalR or (weightL <= totalL and totalR <= weightR):
		print('Yes')
	else:
		print('No')


t = int(input())
for i in range(t):
	(n, a, b, c, d) = map(int, input().split())
	l1 = a + b
	l2 = a - b
	r1 = c + d
	r2 = c - d
	if n * l1 < r2 or n * l2 > r1:
		print('NO')
	else:
		print('YES')


def readline():
	(n, a, b, c, d) = [int(x) for x in input().split()]
	return (n, a, b, c, d)

def is_valid(n, a, b, c, d):
	if n * (a - b) > c + d or n * (a + b) < c - d:
		return 'No'
	return 'Yes'
answers = []
for _ in range(int(input())):
	answers.append(is_valid(*readline()))
print('\n'.join(answers))


t = int(input())
import math
delay = []
for _ in range(t):
	(n, a, b, c, d) = map(int, input().split())
	sm = n * (a - b)
	lg = n * (a + b)
	sm2 = c - d
	lg2 = c + d
	if sm <= lg2 and sm2 <= lg:
		print('Yes')
	else:
		print('No')


import sys
input = sys.stdin.readline

def main():
	t = int(input())
	for _ in range(t):
		(N, A, B, C, D) = [int(x) for x in input().split()]
		for i in range(-D, D + 1):
			if N * (A - B) <= C + i <= N * (A + B):
				print('Yes')
				break
		else:
			print('No')
main()


t = int(input())
for _ in range(t):
	(n, a, b, c, d) = map(int, input().split())
	in_l = a - b
	in_h = a + b
	out_l = c - d
	out_h = c + d
	if in_l * n > out_h or in_h * n < out_l:
		print('NO')
	else:
		print('YES')


t = int(input())
while t:
	t -= 1
	(n, a, b, c, d) = map(int, input().split())
	l = a - b
	p = a + b
	k = n * l
	q = n * p
	f = c + d
	g = c - d
	if k > f or q < g:
		print('No\n')
	else:
		print('Yes\n')


t = int(input())
for _ in range(t):
	(n, a, b, c, d) = [int(x) for x in input().split()]
	if n * (a + b) < c - d:
		print('No')
		continue
	elif n * (a - b) > c + d:
		print('No')
		continue
	else:
		print('Yes')


from sys import stdin
from sys import stdout
sprint = stdout.write
sinput = stdin.readline

def func():
	[n, a, b, c, d] = [int(x) for x in input().split()]
	M = n * (a + b)
	m = n * (a - b)
	r = c - d
	R = c + d
	print('Yes') if M >= r and m <= R else print('No')
t = int(sinput())
while t != 0:
	t -= 1
	func()


queries = int(input())
for _ in range(queries):
	(n, a, b, c, d) = map(int, input().split())
	(min_grain, max_grain) = (a - b, a + b)
	(min_total, max_total) = (c - d, c + d)
	yesno = False
	for weigth in range(min_total, max_total + 1):
		value = weigth / n
		if value >= min_grain and value <= max_grain:
			yesno = True
			break
	if yesno:
		print('Yes')
	else:
		print('No')


t = int(input())
while t > 0:
	t -= 1
	(n, a, b, c, d) = map(int, input().split())
	if n * (a - b) <= c + d and c - d <= n * (a + b):
		print('yes')
	else:
		print('no')


from collections import deque, defaultdict, Counter
from bisect import bisect_left, bisect
import math

def test_case():
	inf = list(map(int, input().split()))
	(n, a, b, c, d) = inf
	if n * (a - b) > c + d or n * (a + b) < c - d:
		return 'No'
	else:
		return 'Yes'
for _ in range(int(input())):
	ret = test_case()
	if ret:
		print(ret)


kl = int(input())
for l in range(kl):
	(n, a, b, c, d) = map(int, input().split())
	gn = n * (a - b)
	gv = n * (a + b)
	if gv >= c - d and gn <= c + d:
		print('Yes')
	else:
		print('No')


import sys
import math
from collections import defaultdict

def solve(t):
	(n, a, b, c, d) = map(int, input().split())
	start = (a - b) * n
	end = (a + b) * n
	if c - d > end or c + d < start:
		print('No')
	else:
		print('Yes')
test_cases = int(input())
for t in range(1, test_cases + 1):
	solve(t)


import os

def f(n, a, b, c, d):
	l = n * (a - b)
	u = n * (a + b)
	return not (c + d < l or u < c - d)

def pp(input):
	n_test = int(input())
	for i in range(n_test):
		a = 'Yes' if f(*map(int, input().split())) else 'No'
		print(a)
if 'paalto' in os.getcwd():
	from string_source import string_source
	s1 = string_source('5\n7 20 3 101 18\n11 11 10 234 2\n8 9 7 250 122\n19 41 21 321 10\n3 10 8 6 1\n')
	pp(s1)
else:
	pp(input)


ans = []
l = int(input())
for x in range(l):
	flag = True
	(n, a, b, c, d) = input().split()
	n = int(n)
	a = int(a)
	b = int(b)
	c = int(c)
	d = int(d)
	if (a - b) * n > c + d:
		flag = False
	if (a + b) * n < c - d:
		flag = False
	if flag == True:
		ans.append('Yes')
	else:
		ans.append('No')
for x in ans:
	print(x)


import sys

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

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

def input():
	return sys.stdin.readline().strip()
for _ in range(int(input())):
	(n, a, b, c, d) = get_ints()
	if (a - b) * n > c + d:
		print('No')
	elif (a + b) * n < c - d:
		print('No')
	else:
		print('Yes')


t = int(input())
for i in range(t):
	(n, a, b, c, d) = map(int, input().split())
	mi = n * (a - b)
	mx = n * (a + b)
	min_wt = c - d
	max_wt = c + d
	if mi > max_wt or mx < min_wt:
		print('No')
	else:
		print('Yes')


for i in range(int(input())):
	(n, a, b, c, d) = [int(num) for num in input().split()]
	l = (a - b) * n
	r = (a + b) * n
	if l > c + d or r < c - d:
		print('No')
	else:
		print('Yes')


from math import *
from random import *
for t in range(int(input())):
	(n, a, b, c, d) = map(int, input().split())
	if n * (a + b) < c - d or n * (a - b) > c + d:
		print('No')
	else:
		print('Yes')


import sys
import os.path

def solve():
	for tests in range(int(input())):
		(n, a, b, c, d) = map(int, input().split())
		ok = False
		sum_weight = (a - b) * n
		if sum_weight < c - d:
			ok = True if c - d - sum_weight <= 2 * b * n else False
		elif c - d <= sum_weight <= c + d:
			ok = True
		print('Yes' if ok else 'No')

def main():
	if os.path.exists('test.inp'):
		sys.stdin = open('test.inp', 'r')
	solve()
main()


sp = lambda : list(map(int, input().split()))
si = lambda : int(input())
TESTCASES = int(input())
for tc in range(TESTCASES):
	(n, a, b, c, d) = sp()
	print(('No', 'Yes')[n * (a - b) <= c + d and c - d <= n * (a + b)])


for _ in range(int(input())):
	(n, a, b, c, d) = map(int, input().split())
	minwg = a - b
	maxwg = a + b
	minwp = c - d
	maxwp = c + d
	if minwp < n * minwg and maxwp < n * minwg or (minwp > n * maxwg and maxwp > n * maxwg):
		print('NO')
	else:
		print('YES')


for i in range(int(input())):
	(n, a, b, c, d) = list(map(int, input().split()))
	p = a - b
	q = a + b
	r = c - d
	s = c + d
	if q * n < r:
		print('NO')
	elif p * n > s:
		print('NO')
	else:
		print('YES')


def output(x, A, B):
	print('Case #{0}: {1} {2}'.format(x, A, B))

def solve(time):
	(n, a, b, c, d) = [int(x) for x in input().split(' ')]
	(w0, w1) = (a - b, a + b)
	(t0, t1) = (c - d, c + d)
	(r0, r1) = (t0 / n, t1 / n)
	if max(r0, w0) <= min(r1, w1):
		print('YES')
	else:
		print('NO')
nums = int(input())
for _ in range(1, nums + 1):
	solve(_)


t = int(input())
for loop in range(t):
	arr = list(map(int, input().split()))
	abmin = arr[1] - arr[2]
	abmax = arr[1] + arr[2]
	cdmin = arr[3] - arr[4]
	cdmax = arr[3] + arr[4]
	if abmin * arr[0] > cdmax:
		print('No')
	elif abmax * arr[0] < cdmin:
		print('No')
	else:
		print('Yes')


from bisect import bisect, bisect_left, bisect_right, insort, insort_left, insort_right
from itertools import permutations
from datetime import datetime
from math import ceil, sqrt, log, gcd

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

def si():
	return input()

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

def li():
	return list(mi())
abc = 'abcdefghijklmnopqrstuvwxyz'
abd = {'a': 0, 'b': 1, 'c': 2, 'd': 3, 'e': 4, 'f': 5, 'g': 6, 'h': 7, 'i': 8, 'j': 9, 'k': 10, 'l': 11, 'm': 12, 'n': 13, 'o': 14, 'p': 15, 'q': 16, 'r': 17, 's': 18, 't': 19, 'u': 20, 'v': 21, 'w': 22, 'x': 23, 'y': 24, 'z': 25}
mod = 1000000007
inf = float('inf')
vow = ['a', 'e', 'i', 'o', 'u']
(dx, dy) = ([-1, 1, 0, 0], [0, 0, 1, -1])

def powmod(a, b):
	a %= mod
	if a == 0:
		return 0
	res = 1
	while b > 0:
		if b & 1:
			res = res * a % mod
		a = a * a % mod
		b >>= 1
	return res

def main():
	for _ in range(ii()):
		(n, a, b, c, d) = mi()
		(a, b) = (a - b, a + b)
		(c, d) = (c - d, c + d)
		f = 0
		f1 = 0
		for i in range(a, b + 1):
			x = i * n
			if x >= c:
				f1 = 1
			if x <= d:
				f = 1
		if f == 1 and f1 == 1:
			print('Yes')
		else:
			print('No')
main()


for _ in range(int(input())):
	(n, a, b, c, d) = [int(s) for s in input().split()]
	min = n * (a - b)
	max = n * (a + b)
	if c - d > max or c + d < min:
		print('NO')
	else:
		print('YES')


import sys
input = sys.stdin.readline

def good(n, a, b, c, d):
	(mn, mx) = (n * (a - b), n * (a + b))
	if mn > c + d:
		return False
	if mx < c - d:
		return False
	return True
for _ in range(int(input())):
	(n, a, b, c, d) = map(int, input().split())
	print('Yes' if good(n, a, b, c, d) else 'No')


from sys import stdin, exit, setrecursionlimit
from collections import deque
setrecursionlimit(10000000)
input = stdin.readline
lmi = lambda : list(map(int, input().split()))
mi = lambda : map(int, input().split())
si = lambda : input().strip('\n')
ssi = lambda : input().strip('\n').split()
for _ in range(int(input())):
	(n, a, b, c, d) = mi()
	if (a - b) * n > c + d or (a + b) * n < c - d:
		print('No')
	else:
		print('Yes')


def sol():
	s = input()
	s = s.split(' ')
	n = int(s[0])
	a = int(s[1])
	b = int(s[2])
	c = int(s[3])
	d = int(s[4])
	if (a + b) * n < c - d:
		return 'No'
	if (a - b) * n > c + d:
		return 'No'
	return 'Yes'
t = int(input())
while int(t) > 0:
	t -= 1
	print(sol(), '\n')


t = int(input())
for i in range(t):
	(n, a, b, c, d) = list(map(int, input().strip().split()))
	mg = a - b
	Mg = a + b
	mw = c - d
	Mw = c + d
	if mg * n > Mw or Mg * n < mw:
		print('No')
	else:
		print('Yes')


t = int(input())
for i in range(t):
	(n, a, b, c, d) = map(int, input().split())
	flag = 0
	if n * (a - b) > c + d or n * (a + b) < c - d:
		flag = 1
	if flag == 0:
		print('Yes')
	else:
		print('No')


def checker(n, a, b, c, d):
	(l, r) = (n * (a - b), n * (a + b))
	return 'NO' if r < c - d or c + d < l else 'YES'
for _ in range(int(input())):
	(N, A, B, C, D) = [int(i) for i in input().split()]
	print(checker(N, A, B, C, D))


def solve():
	(grains, a, b, c, d) = map(int, input().split())
	middle = grains * a
	extra = grains * b
	if c > middle:
		if middle + extra + d >= c:
			print('Yes')
		else:
			print('No')
	elif c <= middle and middle - extra - d <= c:
		print('Yes')
	else:
		print('No')
t = int(input())
for i in range(t):
	solve()


import sys, math, cmath, time
start_time = time.time()

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

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

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

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

def solve():
	(n, a, b, c, d) = invr()
	if n * (a - b) > c + d or n * (a + b) < c - d:
		print('No')
	else:
		print('Yes')
ONLINE_JUDGE = __debug__
if not ONLINE_JUDGE:
	sys.stdin = open('input.txt', 'r')
	sys.stdout = open('output.txt', 'w')
else:
	input = sys.stdin.readline
t = 1
t = inp()
for tt in range(t):
	solve()
if not ONLINE_JUDGE:
	print('Time Elapsed:', time.time() - start_time, 'seconds')
sys.stdout.close()


n = int(input())
for i in range(n):
	a = list(map(int, input().strip().split()))[:5]
	n1 = a[0]
	a1 = a[1]
	b = a[2]
	c = a[3]
	d = a[4]
	if (a1 - b) * n1 > c + d or (a1 + b) * n1 < c - d:
		print('No')
	else:
		print('Yes')


import os
import sys
from io import BytesIO, IOBase
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')
testcases = int(input())
for j in range(testcases):
	vals = list(map(int, input().split()))
	n = vals[0]
	a = vals[1]
	b = vals[2]
	c = vals[3]
	d = vals[4]
	lb1 = n * (a - b)
	ub1 = n * (a + b)
	lb2 = c - d
	ub2 = c + d
	if lb2 >= lb1 and lb2 <= ub1 or (ub2 >= lb1 and ub2 <= ub1):
		print('Yes')
	elif lb1 <= ub2 and lb1 >= lb2 or (ub1 <= ub2 and ub1 >= lb2):
		print('Yes')
	else:
		print('No')


import sys
try:
	sys.stdin = open('input.txt', 'r')
	sys.stdout = open('output.txt', 'w')
except:
	pass
input = sys.stdin.readline
for tt in range(int(input())):
	(n, a, b, c, d) = map(int, input().split())
	for i in range(c - d, c + d + 1):
		if a - b <= i / n <= a + b:
			print('YES')
			break
	else:
		print('NO')


def integer(array):
	for i in range(len(array)):
		array[i] = int(array[i])
	return array
N = int(input())
inputs = []
for i in range(N):
	inputs.append(integer(str(input()).split(' ')))

def rice(n, a, b, c, d):
	if n * (a + b) < c - d:
		return 'No'
	elif n * (a - b) > c + d:
		return 'No'
	return 'Yes'
for i in inputs:
	print(rice(i[0], i[1], i[2], i[3], i[4]))


import math
t = int(input())

def solve(nums):
	(n, a, b, c, d) = nums
	mn = n * (a - b)
	mx = n * (a + b)
	if mn > c + d or mx < c - d:
		return 'NO'
	return 'YES'
for _ in range(t):
	nums = list(map(int, input().split()))
	print(solve(nums))


for _ in range(int(input())):
	(n, a, b, c, d) = map(int, input().split())
	miw = (a - b) * n
	maw = (a + b) * n
	mit = c - d
	mat = c + d
	if miw < mit and maw < mit or (miw > mat and maw > mat):
		print('No')
	else:
		print('Yes')


for _ in range(int(input())):
	(n, a, b, c, d) = map(int, input().split())
	minimum = n * (a - b)
	maximum = n * (a + b)
	if minimum <= c + d and maximum >= c - d:
		print('Yes')
	else:
		print('No')


for _ in range(0, int(input())):
	data = list(map(int, input().split()))
	n = data[0]
	a = data[1]
	b = data[2]
	c = data[3]
	d = data[4]
	each_max = a + b
	each_min = a - b
	total_max = c + d
	total_min = c - d
	if each_min * n > total_max:
		print('No')
	elif each_max * n < total_min:
		print('No')
	else:
		print('Yes')


s = []
for jjoj in range(int(input())):
	(n, a, b, c, d) = map(int, input().split())
	m1 = a - b
	m2 = a + b
	n1 = c - d
	n2 = c + d
	if n1 <= m1 * n <= n2 or n1 <= m2 * n <= n2 or (m1 * n < n1 and m2 * n > n2):
		s.append('Yes')
	else:
		s.append('No')
for i in s:
	print(i)


t = int(input())
for _ in range(t):
	(n, a, b, c, d) = list(map(int, input().split()))
	min_grain = n * (a - b)
	max_grain = n * (a + b)
	if min_grain < c - d and max_grain < c - d or (min_grain > c + d and max_grain > c + d):
		print('No')
	else:
		print('Yes')


T = int(input())
results = []
for i in range(T):
	(n, a, b, c, d) = [int(i) for i in input().split()]
	ab = a + b
	ba = a - b
	cd = c + d
	dc = c - d
	result = 'Yes'
	if n * ab < dc or n * ba > cd:
		result = 'No'
	results.append(result)
for result in results:
	print(result)


t = int(input())
while t > 0:
	(n, a, b, c, d) = map(int, input().split())
	x = a - b
	y = a + b
	z = c - d
	w = c + d
	if x * n <= w and y * n >= z:
		print('Yes')
	else:
		print('No')
	t -= 1


t = int(input())
for i in range(t):
	(n, a, b, c, d) = map(int, input().split())
	l = a - b
	r = a + b
	rl = c - d
	rr = c + d
	l *= n
	r *= n
	if r < rl:
		print('NO')
	elif l > rr:
		print('NO')
	else:
		print('YES')


t = int(input())
for hh in range(0, t):
	(n, a, b, c, d) = [int(x) for x in input().split()]
	mng = a - b
	mxg = a + b
	mnr = c - d
	mxr = c + d
	if n * mxg >= mnr and n * mng <= mxr:
		print('Yes')
	else:
		print('No')


t = int(input())
while t:
	li = input().split()
	n = int(li[0])
	a = int(li[1])
	b = int(li[2])
	c = int(li[3])
	d = int(li[4])
	m1 = (a - b) * n
	m2 = (a + b) * n
	p1 = c - d
	p2 = c + d
	if m1 >= p1 and m1 <= p2:
		print('Yes')
	elif m2 >= p1 and m1 <= p2:
		print('Yes')
	else:
		print('No')
	t -= 1


for _ in range(int(input())):
	l = list(map(int, input().split()))
	a1 = l[1] + l[2]
	a2 = l[3] + l[4]
	s1 = abs(l[1] - l[2])
	s2 = abs(l[3] - l[4])
	n = l[0]
	if n * a1 < s2 or n * s1 > a2:
		print('No')
	else:
		print('Yes')


t = int(input())
for i in range(0, t):
	linea1 = [int(x) for x in input().split()]
	n = linea1[0]
	a = linea1[1]
	b = linea1[2]
	c = linea1[3]
	d = linea1[4]
	v = a - b
	w = a + b
	x = c - d
	y = c + d
	resta1 = n * w - x
	resta2 = y - n * v
	if resta1 >= 0 and resta2 >= 0:
		print('YES')
	else:
		print('NO')


t = int(input())
while t > 0:
	(n, a, b, c, d) = map(int, input().split())
	sm = a - b
	en = a + b
	x = c - d
	y = c + d
	flag = 0
	if sm * n <= y and en * n >= x:
		print('Yes')
	else:
		print('No')
	t -= 1


T = int(input())
for test_no in range(T):
	(n, a, b, c, d) = map(int, input().split())
	min_n = (c - d) / (a + b)
	if min_n % 1 != 0:
		min_n = int(min_n) + 1
	else:
		min_n = int(min_n)
	max_n = (c + d) / (a - b)
	if max_n % 1 != 0:
		max_n = int(max_n)
	if min_n <= n <= max_n:
		print('YES')
	else:
		print('NO')


def count():
	(n, a, b, c, d) = list(map(int, input().split(' ')))
	if n * (a - b) <= c + d and n * (a + b) >= c - d:
		return 'yes'
	else:
		return 'no'
for i in range(int(input())):
	print(count())


t = int(input())
for _ in range(t):
	(n, a, b, c, d) = [int(x) for x in input().split()]
	s = n * (a - b)
	t = n * (a + b)
	if s <= c + d and t >= c - d:
		print('Yes')
	else:
		print('No')


for _ in range(int(input())):
	(n, a, b, c, d) = map(int, input().split())
	flag = 0
	left = n * (a - b)
	right = n * (a + b)
	if right < c - d or c + d < left:
		print('NO')
	else:
		print('YES')


t = int(input())
for t in range(t):
	li = list(map(int, input().split(' ')))
	c = li[1] - li[2]
	d = li[1] + li[2]
	a = li[3] - li[4]
	b = li[3] + li[4]
	flag = 0
	if c * li[0] <= b and c * li[0] >= a:
		print('Yes')
		continue
	previous = c * li[0]
	for i in range(c + 1, d + 1):
		cur_sum = i * li[0]
		if cur_sum <= b and cur_sum >= a:
			flag = 1
			print('Yes')
			break
		if previous <= a and a <= cur_sum or (previous <= b and b <= cur_sum):
			print('Yes')
			flag = 1
			break
	if flag == 0:
		print('No')


def chk(a, b, c, d):
	if c >= a and c <= b:
		return True
	elif a >= c and a <= d:
		return True
	else:
		return False
t = int(input())
while t != 0:
	(n, a, b, c, d) = [int(i) for i in input().split()]
	if chk(n * (a - b), n * (a + b), c - d, c + d) == True:
		print('Yes')
	else:
		print('No')
	t = t - 1


t = int(input())
for j in range(t):
	l = list(map(int, input().split()))
	n = l[0]
	a_b = (l[1] - l[2]) * n
	ab = (l[1] + l[2]) * n
	c_d = l[3] - l[4]
	cd = l[3] + l[4]
	if c_d <= a_b <= cd or c_d <= ab <= cd or a_b <= c_d <= ab or (a_b <= cd <= ab):
		print('Yes')
	else:
		print('No')


test = int(input())
for i in range(test):
	(a, b, c, d, e) = map(int, input().split())
	(A, B, C, D) = (b - c, b + c, d - e, d + e)
	X = A * a
	Y = B * a
	f = 0
	if X >= C and X <= D:
		f = 1
	elif Y >= C and Y <= D:
		f = 1
	elif X <= C and Y >= D:
		f = 1
	if f == 1:
		print('Yes')
	else:
		print('No')


for i in range(int(input())):
	(n, a, b, c, d) = map(int, input().split())
	lower_limit = n * (a - b)
	uppper_limit = n * (a + b)
	if uppper_limit < c - d or lower_limit > c + d:
		print('No')
	else:
		print('Yes')


def solve(n, a, b, c, d):
	min = n * (a - b)
	max = n * (a + b)
	if min <= c + d and max >= c - d:
		return 'Yes'
	else:
		return 'No'
t = int(input())
for _n in range(0, t):
	(n, a, b, c, d) = list(map(int, input().split(' ')))
	print(solve(n, a, b, c, d))


for s in [*open(0)][1:]:
	(n, a, b, c, d) = map(int, s.split())
	print('NYoe s'[c + d >= n * (a - b) <= n * (a + b) >= c - d::2])


def weight(n, a, b, c, d):
	return 'YES' if n * (a + b) >= c - d and n * (a - b) <= c + d else 'NO'
t = int(input())
for i in range(t):
	(n, a, b, c, d) = map(int, input().split())
	print(weight(n, a, b, c, d))


def sample(n, a, b, c, d):
	mi = a - b
	ma = a + b
	mi = n * mi
	ma = n * ma
	to_min = c - d
	to_max = c + d
	flag = 0
	if ma < to_min:
		flag = 1
	if ma > to_min:
		if mi > to_max:
			flag = 1
	if flag == 1:
		return 'No'
	else:
		return 'Yes'
t = int(input())
for i in range(t):
	(n, a, b, c, d) = map(int, input().split())
	print(sample(n, a, b, c, d))


import itertools

def main():
	for _ in range(int(input())):
		(n, a, b, c, d) = map(int, input().split())
		w = [(a - b) * n, (a + b) * n]
		p = [c - d, c + d]
		s = 0
		if w[0] < p[0]:
			if w[1] < p[0]:
				pass
			elif a - b <= int(p[0] / n) <= a + b:
				s = 1
		if w[0] >= p[0]:
			if w[0] <= p[1]:
				s = 1
			elif a - b <= int(p[0] / n) <= a + b:
				s = 1
		print(['No\n', 'Yes\n'][s])
main()


tc = int(input().strip())
while tc:
	(n, a, b, c, d) = map(int, input().strip().split())
	if n * (a - b) > c + d or n * (a + b) < c - d:
		print('NO')
	else:
		print('YES')
	tc -= 1


for _ in range(int(input())):
	X = list(map(int, input().split()))
	Min = max(1, X[1] - X[2])
	if Min * X[0] > X[3] + X[4] or (X[1] + X[2]) * X[0] < X[3] - X[4]:
		print('NO')
	else:
		print('YES')


from sys import stdin

def help():
	(n, a, b, c, d) = map(int, stdin.readline().split(' '))
	start = c - d
	end = c + d
	if (a - b) * n > end or (a + b) * n < start:
		print('No')
	else:
		print('Yes')
for i in range(int(stdin.readline())):
	help()


import sys
input = sys.stdin.readline

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

def inlt():
	return list(map(int, input().split()))
results = []
for t in range(inp()):
	(n, a, b, c, d) = inlt()
	x = n * (a + b) < c - d or n * (a - b) > c + d
	results.append('Yes' if not x else 'No')
for r in results:
	print(r)


q = int(input())
for x in range(q):
	lst = [int(i) for i in input().split()][:5]
	n = lst[0]
	a = lst[1]
	b = lst[2]
	c = lst[3]
	d = lst[4]
	if n * (a - b) < c - d and n * (a + b) < c - d or (n * (a - b) > c + d and n * (a + b) > c + d):
		print('No')
	else:
		print('Yes')


for _ in range(int(input())):
	(s, l, m, n, o) = map(int, input().split())
	if s * (l - m) > n + o:
		print('No')
	elif s * (l + m) < n - o:
		print('No')
	else:
		print('Yes')


t = int(input())
for i in range(t):
	(n, a, b, c, d) = map(int, input().split())
	lg = a - b
	ug = a + b
	lp = c - d
	up = c + d
	lw = n * lg
	uw = n * ug
	if uw < lp or lw > up:
		print('NO')
	else:
		print('YES')


from sys import stdin, stdout
import bisect

def main():
	for _ in range(int(stdin.readline())):
		(n, a, b, c, d) = map(int, stdin.readline().split())
		gmn = a - b
		gmx = a + b
		l = c - d
		r = c + d
		if gmx * n >= l and gmn * n <= r:
			print('Yes')
		else:
			print('No')
main()


for i in range(int(input())):
	(n, a, b, c, d) = list(map(int, input().split()))
	u = (a - b) * n
	z = (a + b) * n
	if z < c - d or u > c + d:
		print('NO')
	else:
		print('YES')


n = int(input())
for _ in range(n):
	(n, a, b, c, d) = list(map(int, input().split()))
	each = [a - b, a + b]
	package = [c - d, c + d]
	possible = [each[0] * n, each[1] * n]
	fine = False
	if package[1] >= possible[0] and package[1] <= possible[1]:
		fine = True
	elif possible[1] >= package[0] and possible[1] <= package[1]:
		fine = True
	if fine:
		print('Yes')
	else:
		print('No')


for tc in range(0, int(input())):
	(n, a, b, c, d) = input().split()
	(n, a, b, c, d) = (int(n), int(a), int(b), int(c), int(d))
	min_grains_weight = (a - b) * n
	max_grains_weight = (a + b) * n
	min_grain_bag = c - d
	max_grain_bag = c + d
	if min_grains_weight >= min_grain_bag and min_grains_weight <= max_grain_bag:
		print('Yes')
	elif max_grains_weight >= min_grain_bag and max_grains_weight <= max_grain_bag:
		print('Yes')
	elif min_grains_weight < min_grain_bag and max_grains_weight > max_grain_bag:
		print('Yes')
	else:
		print('No')