Solve the linear equation ax + b = 0 in integers.
Two integers are entered: a and b.
Output all solutions if their number is finite; output "NO" (without quotes) if there are none; output "INF" (without quotes) if there are infinitely many solutions.
Input #1
6 -2
Output #1
NO
Input #2
1 1
Output #2
-1
Sign in to submit your solution and save your progress.