If a and b are not both 0, then they have only a finite number of common divisors. Note that 1 is always a common divisor. Hence the greatest common divisor exists.