L.C.M. of 6, 9, 15 and 18 is 90.Let required number be 90k + 4, which is multiple of 7.Least value of k for which (90k + 4) is divisible by 7 is k = 4.Required number = (90 x 4) + 4 = 364.
L.C.M. of 5,6,7,8 = 840. Required number is of the form 840k + 3 Least value of k for which (840k + 3) is divisible by 9 is k = 2. Required number = (840 X 2 + 3)=1683