GCD for both positive and negative numbers