C # implementation of the approach
using System ; class GFG { static void findpair ( int l , int r ) { int c = 0 ; for ( int i = l ; i <= r ; i ++ ) { for ( int j = i + 1 ; j <= r ; j ++ ) { if ( j % i == 0 && j != i ) { Console . Write ( i + " , ▁ " + j ) ; c = 1 ; break ; } } if ( c == 1 ) break ; } }