you give array integer a_1 a_2 ldot a_n b_1 b_2 ldot b_n you need handle q query follow type 1 l r x assign a_i x l leq leq r 2 l r find minimum value follow expression l leq leq r fracoperatornamelcma_i b_igcda_i b_iin problem gcdx y denote great common divisor x y operatornamelcmx y denote common multiple x y