gcd of 3 integers

Consider three positive integers a, b, and c, and let d = gcd(a,b). Prove that the greatest number dividing all three of a,b,c is gcd(d,c). We know that the common divisors of a and b are the divisors of d.

I can certainly see why this is true, but I'm not really sure where to start here. Would I break a,b, and c up into their prime factors and say that p(1),...,p(i) are common between all three? Then maybe show that d contains all those factors as well? I'm not really sure how this would exactly work.

Consider three positive integers a, b, and c, and let d = gcd(a,b). Prove that the greatest number dividing all three of a,b,c is gcd(d,c). We know that the common divisors of a and b are the divisors of d.

I can certainly see why this is true, but I'm not really sure where to start here. Would I break a,b, and c up into their prime factors and say that p(1),...,p(i) are common between all three? Then maybe show that d contains all those factors as well? I'm not really sure how this would exactly work.

Prime factorization would work I think, but it should also follow from the definition of gcd.