- The output should contain a single line with a single word
- The word should be YES if it is possible to partition the input array intro triplets which satisfy the constraints above and NO otherwise