Two numbers and the four actions
Over two positive integers were executed the following four steps:
- they were added;
- the less number was subtracted from the larger;
- they were multiplied;
- the bigger number was divided by the smaller.
The results were added - and the number n was obtained. You must find all such pairs of numbers.
One positive integer n (1 ≤ n ≤
Print on a separate lines the pairs of integers x ≤ y, satisfying the problem. Couples must be ordered by increasing x. If there is no pair of numbers satisfying the condition, display "**NO SOLUTION**" (without the quotes).
2 54 8 24