## Vasile and Haircuts

View as PDF

Points: 3
Time limit: 1.0s
Memory limit: 256M

Authors:
Problem types
Allowed languages
Ada, Assembly, Awk, Brain****, C, C#, C++, COBOL, CommonLisp, D, Dart, F#, Forth, Fortran, Go, Groovy, Haskell, Intercal, Java, JS, Kotlin, Lisp, Lua, Nim, ObjC, OCaml, Octave, Pascal, Perl, PHP, Pike, Prolog, Python, Racket, Ruby, Rust, Scala, Scheme, Sed, Swift, TCL, Text, Turing, VB, Zig

Vasile runs a barber shop. His customers tell him how long their hair is before he cuts it, and how much they want cut off.

Determine whether the length after the cut is inside the acceptable inclusive range.

#### Input

The first line will contain an integer , the number of haircuts he gives.

The following lines contain 4 numbers. Each line represents a customer's order, where there will be four space-separated integers in the format L A B F, the initial length of the customer's hair, the minimum they want taken off, the maximum they want taken off, and the final length of their hair.

#### Output

lines, the being Yes if the final length is within the acceptable range, or No if it isn't in the acceptable range.

#### Sample Input

5
20 5 10 12
10 2 4 8
15 3 5 10
3 1 2 3
20 2 3 1

#### Sample Output

Yes
Yes
Yes
No
No