Updated for GCD/LCM