Олимпиадный тренинг

Задача 38198. The equation


Solve the equation in integers:

\( { \sqrt{ax +b}} = c\)

a, b, c – given integers: find all solutions or report that there are no solutions in integers.

Input
Enter three numbers a, b and c separated by spaces.

Imprint
The program should display all solutions of the equation in ascending order, or NO SOLUTION (in capital letters) if there are no solutions. If there are infinitely many solutions, output MANY SOLUTIONS. 
Examples
# Input Output
1 1 0 0 0
2 1 2 -3 NO SOLUTION