Let a1/b1,...,an/bn be rational numbers, where ai and bi are relatively prime for all i. If M=lcm{b1,...,bn}, prove that gcd(M*(a1/b1),...,M*(an/bn)) = gcd(a1,...,an)

I am having trouble with the proof, i cant give you what i have so far because i dont know where to start.