By Alex Paixão, UNIME Brazil
Professor Alex is passionate about his programming marathons, if he could make it every end of the month, but he receives few resources to give the students. One of these events will win a lot of blue and black pens, but he does not know how much he should receive. And it wants to distribute in equal packages for each team.
He asked for his help, based on the amount of pens he receives, blue and black, he wants to pack all these pens so that each package contains only pens with the same color ink and will give it to all participating teams.
You will receive 3 values, in which the first will be the amount of blue pens, the second the amount of black pens and the third the amount of teams. The three values will be (1 <= n<= 1000);
You will get a "sim" answer if you get packages for all teams and "nao" if you do not leave. Do not forget the end of line after the product, otherwise your program will display the message: “Presentation Error”.
Input Sample | Output Sample |
224 160 12 1 1 2 890 900 300 |
sim sim nao |