You will be given two integers $n$ and $m$ where $GCD(n, m) = 1$. You have to tell that how many numbers are there from $1$ to $m×n$ that is co-prime to:

$n$ but not with $m$,

$m$ but not with $n$, and

both $m$ and $n$.

Input

The only line of input contains two integers $n$ and $m$ ($1 ≤ n, m ≤ 10^6$). It is guaranteed that $n$ and $m$ are relatively prime.

Output

Output three numbers as mentioned above.

Samples

Input

Output

2 3

1 2 2

Input

Output

5 7

4 6 24

Please note that for relatively prime numbers $n$ and $m$, $Phi(n×m) = Phi(n)×Phi(m)$.