make neumarator and denominator coprime
up = parseInt ( up / g ) ; down = parseInt ( down / g ) ; document . write ( up + " " + down + " " ) ; } function gcd ( a , b ) { if ( b == 0 ) return a ; return gcd ( b , a % b ) ; }