- The output should consist of a single line with a single word
- The word should be YES if it is possible to operate the factory for atleast D days following the constraints and NO otherwise