Skip to main content
Tuesday (24.11.2026) at 20:00: ALGOR Contest: Round #4 (Special Challenge) starts!

~/algor $ cat problems/if-chiziqli-tenglama-yechimlari

Solutions of a linear equation

Medium 1000 ms 64 MB 44%
Share

Integers $a$ and $b$ are given. Solve the linear equation:

$$a * x + b = 0$$

If $a \ne 0$, print the only root; if $a = 0$ and $b = 0$ (every $x$ is a root), print the word cheksiz (infinitely many); if $a = 0$ and $b \ne 0$ (no roots), print the word yo'q (none).

The graph of a linear function and where it crosses the x-axis

Input

One line with two integers: $a$ and $b$.

Output

One line: the root with exactly 2 digits after the decimal point (for example, 3.00), or cheksiz, or yo'q. If the rounded result is zero (for example, $-0.001$), print 0.00 (not -0.00).

Note

$-1000 \le a, b \le 1000$

Examples

Input #1
2 -6
Output #1
3.00
Input #2
0 5
Output #2
yo'q

Sign in to submit a solution

Signing up is free and takes a minute.