If Barberian is able to shave beards of all magicians, output “Yes” in the first line. The i-th of the following n lines should contain a pair of integers pi, qi, which are the moments at which Barberian should cast the spell on the i-th magician ( ti ≤ pi < qi ≤ ti + si − 1) . If at least one magician disappears before being completely shaved, output a single word “No”.
//qscqesze#include #include #include #include #include #include #include #include #include #include #include #include #include