for multiset positive integer ss_1s_2dotss_k define Greatest Common Divisor GCD Least Common Multiple LCM s follow gcd maximum positive integer x integer s divisible x textrmlcms minimum positive integer x divisible integer sFor example gcd8124gcd121866 textrmlcm4612 Note positive integer x gcdxtextrmlcmxxorac sequence length n he come multiset ttextrmlcma_ia_j ij ask find value gcdt in word need calculate GCD LCMs pair element give sequence