Limits
1s, 512 MB

Every year the CSE Department of ULAB tries to identify "The Best Future Programmer" by a simple time-based performance criteria. This criteria is an indication of a programmer's daily activity.

A good programmer always tries to solve $3$ or more problems in a day. They invest a minimum of $3$ hours to read the programming books/blogs. And, they participate in at least $1$ contest within a week.

Aman is tasked with evaluating the performance of this year’s students. He is given $N$, the number of days since when the student started practicing, $P$, the number of problems he has solved within these $N$ days, $H$, the total hours of reading programming books and blogs in these $N$ days, and $C$, the total number of contests participated in these $N$ days.

Aman needs your help writing a program to do this. You can assume that if, for example, someone has solved $P$ problems in $N$ days, then it doesn’t matter on which exact days the student has solved the problems as long as the criteria is fulfilled. The same applies for $H$ and $C$.

The first line contains $T$ ($1 \leq T \leq 100$), the number of test cases.

The only line of each test case will contain four integers separated by space,

$N$ ($1 \leq N \leq 50000$) — Number of days.

$P$ ($0 \leq P \leq 150000$) — Number of problems solved within $N$ days.

$H$ ($0 \leq H \leq 150000$) — Total hours of reading books/blogs within $N$ days.

$C$ ($0 \leq C \leq 150000$) — Total contest participation within $N$ days.

For each test case, you have to print $\texttt{Yes}$ if Aman’s performance matches with the described criteria otherwise print $\texttt{No}$.

Input | Output |
---|---|

5 1 3 3 1 6 19 20 0 7 25 24 0 7 25 24 1 10000 30000 30000 1428 | Yes Yes No Yes Yes |

Login to submit.

100%
Solution Ratio

Being_GoromEarliest,

TurinhstuFastest, 0.0s

Being_GoromLightest, 131 kB

Being_GoromShortest, 237B

Toph uses cookies. By continuing you agree to our Cookie Policy.