The greatest common divisor and the least common multiple java