Driver code
let res = count ( 1 , 2 ) ; if ( ( res == - 1 ) ) document . write ( " " + " " ) ; else document . write ( res + " " ) ; res = count ( 5 , 3 ) ; if ( ( res == - 1 ) ) document . write ( " " + " " ) ; else document . write ( res + " " ) ; res = count ( 3 , 5 ) ; if ( ( res == - 1 ) ) document . write ( " " + " " ) ; else document . write ( res + " " ) ;