RCPC Simulare 2023 day 2 | C. Basketball

This was the problem page during the contest. Access the current page here.
Time limit: 1s Memory limit: 256MB Input: Output:

Andrei is taking basketball throws. He wants to score nn points.

As he doesn't have a lot of time, he wants to reach nn points from as few throws as possible. As you know, in basketball we can score using throws which get either 22 or 33 points.

If Andrei can't reach nn points, we should print No(exactly as it is written). Otherwise, we will print two integers aa and bb, which represent the minimum number of two point, respectively three point throws Andrei is going to use.

Input data

The first line will contain a single integer, nn (1n1091 \leq n \leq 10^9), representing the amount of points Andrei scored.

Output data

The first and the only line of the output will either contain two integers, aa and bb, or otherwise the message No if he cannot reach nn points.

Example 1

stdin

11

stdout

1 3

Example 2

stdin

33

stdout

0 11

Log in or sign up to be able to send submissions!