#include <bits/stdc++.h>
#define endl "\n"
#define INT long long int

using namespace std;

char infile[100], outfile[100];

int main() {
    ios::sync_with_stdio(false);
    INT T,a, b, n, t, i, I,c,d;
    cin >> T;
    for(I=1;I<=T;I++){
        sprintf(infile, ".%d.in", I);
        freopen(infile, "w", stdout);
        scanf("%lld %lld %lld %lld %lld",&n, &a, &b, &c, &d);
        printf("%lld %lld %lld %lld %lld\n", n, a, b ,c, d);
        sprintf(outfile, ".%d.out", I);
        freopen(outfile, "w", stdout);

        if((a+b)*n < (c-d) ||(a-b)*n>(c+d)){
            printf("NO\n");
        }else{
            printf("YES\n");
        }
    }
}
