1234567891011121314
int GCD( int a, int b ) { a = std::abs( a ); b = std::abs( b ); while ( b ) { int tmp = a % b; a = b; b = tmp; } return ( a ); }