Saleh127

Untitled

Apr 23rd, 2020
123
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.39 KB | None | 0 0
  1. #include<bits/stdc++.h>
  2. using namespace std;
  3. int main()
  4. {
  5. long long t,a,n,b,c,d,e,f,i,j,k,l,m,o,p;
  6. cin>>t;
  7. while(t--)
  8. {
  9. f=0;
  10. cin>>n>>a>>b>>c>>d;
  11. l=n*(a-b);
  12. m=n*(a+b);
  13. o=c-d;
  14. p=c+d;
  15. if(l>p || m<o) f=1;
  16. if(!f)
  17. printf("Yes\n");
  18. else
  19. printf("No\n");
  20. }
  21. return 0;
  22. }
Advertisement
Add Comment
Please, Sign In to add comment