Find two co | Java implementation of the approach ;  ; Function to find the required numbers ; GCD of the given numbers ; Printing the required numbers ; Driver code
import java . math . * ; class GFG { public static int findGCD ( int a , int b ) { if ( b == 0 ) return a ; else return findGCD ( b , a % b ) ; } static void findNumbers ( int a , int b ) { int gcd = findGCD ( a , b ) ; System . out . println ( ( a / gcd ) + " ▁ " + ( b / gcd ) ) ; } public static void main ( String [ ] args ) { int a = 12 , b = 16 ; findNumbers ( a , b ) ; } }