sum != gcd checks that both the numbers are positive or not
if ( __gcd ( gcd , sum - gcd ) == gcd && sum != gcd ) cout << " a ▁ = ▁ " << min ( gcd , sum - gcd ) << " , ▁ b ▁ = ▁ " << sum - min ( gcd , sum - gcd ) << endl ; else cout << -1 << endl ; }