added solution for GCD/LCD