Pairs with GCD equal to one in the given range | Function to print all pairs ; check if even ; We can print all adjacent pairs for ( int i = l ; i < r ; i += 2 ) { cout << " { " << i << " , ▁ " << i + 1 << " } , ▁ " ; } ; Driver Code
< ? php function checkPairs ( $ l , $ r ) { if ( ( $ l - $ r ) % 2 == 0 ) return false ; return true ; } $ l = 1 ; $ r = 8 ; if ( checkPairs ( $ l , $ r ) ) echo ( " Yes " ) ; else echo ( " No " ) ; ? >