Find two co |  ; Function to find the required numbers ; GCD of the given numbers ; Printing the required numbers ; Driver Code
function findGCD ( a , b ) { if ( b == 0 ) return a ; else return findGCD ( b , a % b ) ; } function findNumbers ( a , b ) { var gcd = findGCD ( a , b ) ; document . write ( ( a / gcd ) + " " + ( b / gcd ) ) ; } var a = 12 , b = 16 ; findNumbers ( a , b ) ;