GCD and factorial