#C5887. Larry's Workshop Benefit Evaluation

    ID: 49585 Type: Default 1000ms 256MiB

Larry's Workshop Benefit Evaluation

Larry's Workshop Benefit Evaluation

Larry needs to decide whether attending a series of workshops is beneficial for him. Each workshop is characterized by six parameters: a, p, b, q, c, and r. These parameters are defined as follows:

  • \(a\): Minimum participation time required (in minutes).
  • \(p\): Actual participation time (in minutes).
  • \(b\): Minimum actionable advice required.
  • \(q\): Actual actionable advice received.
  • \(c\): Maximum allowable extension time for the Q&A session (in minutes).
  • \(r\): Actual extension time for the Q&A session (in minutes).

Larry benefits from a workshop if all of the following conditions are met:

  1. The actual participation time \(p\) is greater than or equal to the required time \(a\).
  2. The actionable advice received \(q\) is greater than or equal to the required amount \(b\).
  3. The actual Q&A extension time \(r\) is less than or equal to the allowed extension \(c\).

Your task is to process a series of workshops and determine for each whether Larry benefits. Output YES if he does, and NO if he does not.

inputFormat

The input is read from stdin and has the following format:

  1. The first line contains an integer \(n\), the number of workshops.
  2. Each of the following \(n\) lines contains six space-separated integers: \(a\), \(p\), \(b\), \(q\), \(c\), and \(r\).

outputFormat

For each workshop, output a separate line to stdout containing YES if Larry benefits from the workshop, or NO otherwise.

## sample
1
60 90 15 20 5 3
YES

</p>