The rotation number of lissajou curves

Let m and n be positive integers with (m,n) = 1.

A lissajou curve is defined by   x = cos mt, y = sin nt (0 < t < 2π),


which is smooth, if m is odd.

 m = 1, n = 1  m = 1, n = 2  m = 3, n = 5  m = 5, n = 7
   
The rotation number     1     0     -1     1
 

Theorem(Y. Maezawa and H. Tsuchihashi)
If m and n are positive odd numbers and m = 1 or 3 (mod 4),
then the rotation numer is equal to 1 or -1, respectively.


Input odd numbers which are relatively prime into the boxes below,
and then click the buttons.
m = < 20, n = < 20