Limits
1s, 512 MB

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$.

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 three numbers as mentioned above.

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)$.