P2613 [Template] Rational Number Modulo

Description

Given a rational number $c=\frac{a}{b}$, compute $c \bmod 19260817$. This value is defined as the solution to $bx\equiv a\pmod{19260817}$.

Input Format

There are two lines in total. The first line contains an integer $a$. The second line contains an integer $b$.

Output Format

Output a single integer, representing the result after taking modulo. If there is no solution, output `Angry!`.

Explanation/Hint

For all testdata, it is guaranteed that $0\leq a \leq 10^{10001}$, $1 \leq b \leq 10^{10001}$, and $a, b$ are not both multiples of $19260817$. Translated by ChatGPT 5