An Easy problem
Submissions: 1459   Accuracy:

17.48%

  Difficulty: Basic   Marks: 1

You have been a number K , l , r , x and y . you have to tell if there exist two numbers a and b , such that a/b=K , where a lies between l and r , both inclusive and b lies between x and y , both inclusive . If  such a and b exist then print “YES” otherwise print “NO”.

Input:
First line contains T , indicating number of test cases . Only line of every test case consists of 5 integers K, L, R, X, Y.

Output:
Single line output, print “YES” if such a and b exists else “NO”.

Constraints:
1<=T<=100
1<=K,L,R,X,Y<=10^5

Example:
Input:
2
1 1 10 1 10
1 1 5 6 10
Output:
YES
NO

** For More Input/Output Examples Use 'Expected Output' option **

Contributor: PVash
Author: pvash1070091


If you have purchased any course from GeeksforGeeks then please ask your doubt on course discussion forum. You will get quick replies from GFG Moderators there.



Need help with your code? Please use ide.geeksforgeeks.org, generate link and share the link here.

to report an issue on this page.