#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie();
  cout.tie();
  int t;
  cin >> t;
  while (t--) {
    int n, a, b, c, d;
    cin >> n >> a >> b >> c >> d;
    bool v = false;
    int low = c - d, high = c + d;
    for (int i = a - b; i <= a + b; i++) {
      int temp = i * n;
      if (temp >= low && temp <= high) v = true;
      if (i != a + b) {
        if (temp < low && temp + n > high) v = true;
      }
    }
    if (v)
      cout << "YES\n";
    else
      cout << "NO\n";
  }
}
