#include <bits/stdc++.h>
using namespace std;
using namespace std::chrono;
template <typename T>
void printV(T vec) {
  for (int i = 0; i < (long long)vec.size(); i++)
    cout << vec[i] << " " << flush;
  cout << endl;
}
const int INF = 1e9 + 5;
unsigned long long gcd(unsigned long long a, unsigned long long b) {
  if (b == 0) return a;
  return gcd(b, a % b);
}
unsigned long long findlcm(unsigned long long arr[], unsigned long long n) {
  long long ans = arr[0];
  for (unsigned long long i = 1; i < n; i++)
    ans = (((arr[i] * ans)) / (gcd(arr[i], ans)));
  return ans;
}
int main() {
  stringstream ss;
  cout << setprecision(16);
  ios::sync_with_stdio(0);
  cin.tie(0);
  long long testCase;
  cin >> testCase;
  for (long long tt = 0; tt < testCase; tt++) {
    long long n, a, b, c, d;
    cin >> n >> a >> b >> c >> d;
    bool truth = false;
    if (((a - b) * n >= c - d and (a - b) * n <= c + d) or
        ((a + b) * n <= c + d and (a + b) * n >= c - d))
      truth = true;
    if ((((a - b) * n) <= c - d and (a + b) * n >= c - d) or
        ((a - b) * n <= c + d and (a + b) * n >= c + d))
      truth = true;
    if (((a - b) * n <= c - d and (a + b) * n >= c + d)) truth = true;
    if (truth) {
      cout << "YES" << endl;
    } else {
      cout << "NO" << endl;
    }
  }
  return 0;
}
