#include <bits/stdc++.h>
using namespace std;
int main() {
  int t;
  cin >> t;
  while (t--) {
    int n, a, b, c, d;
    cin >> n >> a >> b >> c >> d;
    int x = (a - b) * n;
    int y = (a + b) * n;
    int h = c - d;
    int l = c + d;
    if (x < h && y < h || x > l && y > l) {
      cout << "NO" << endl;
    } else {
      cout << "YES" << endl;
    }
  }
}
