Represent ( 2 / N ) as the sum of three distinct positive integers of the form ( 1 / m ) | Java implementation of the approach ; Function to find the required fractions ; Base condition ; For N > 1 ; Driver code
class GFG { static void find_numbers ( int N ) { if ( N == 1 ) { System . out . print ( - 1 ) ; } else { System . out . print ( N + " ▁ " + ( N + 1 ) + " ▁ " + ( N * ( N + 1 ) ) ) ; } } public static void main ( String [ ] args ) { int N = 5 ; find_numbers ( N ) ; } }