Printing the factors
if ( k % 2 == 0 && h % 2 == 0 ) { k = k / 2 ; h = h / 2 ; System . out . print ( " Factors ▁ are : ▁ " + ( ( k ) * ( k ) + ( h ) * ( h ) ) + " ▁ " + ( l * l + m * m ) + "NEW_LINE"); } else { l = l / 2 ; m = m / 2 ; System . out . print ( " Factors ▁ are : ▁ " + ( ( l ) * ( l ) + ( m ) * ( m ) ) + " ▁ " + ( k * k + h * h ) + "NEW_LINE"); } }