function to find and prlet co - prime pair
function pairSum ( n ) { let mid = Math . floor ( n / 2 ) ; for ( let i = mid ; i >= 1 ; i -- ) { if ( coprime ( i , n - i ) == true ) { document . write ( i + " " + ( n - i ) ) ; break ; } } }