#include <bits/stdc++.h>
using namespace std;
const long long int INF = LLONG_MAX;
vector<long long int> v1, v2;
string s1, s2, s3;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  long long int a, b, c, d, e, n, f, i, j, k, cnt1 = 0, cnt2 = 0, sum1 = 0,
                                              sum2 = 0, chk1 = 0, chk2 = 0, T;
  cin >> T;
  while (T--) {
    long long int chk = 0;
    cin >> n >> a >> b >> c >> d;
    long long int p = c - d;
    long long int q = c + d;
    long long int x = a - b;
    long long int y = a + b;
    for (i = x; i <= y; i++) {
      long long int xx = i * n;
      if (xx >= p) {
        if (xx >= p && xx <= q) {
          chk = 1;
          break;
        }
        long long int extra = xx - q;
        if (extra <= n) {
          long long int nn = i - 1;
          if (nn >= x && nn <= y) {
            chk = 1;
            break;
          }
        }
        break;
      }
    }
    if (chk) {
      cout << "YES" << endl;
      ;
    } else {
      cout << "NO" << endl;
      ;
    }
  }
  return 0;
}
