
def PrintCommonFactors(a, b):
# This is supposed to print all of the common factors of numbers a and b
    factor = 1
    while factor <= a:
        if a%factor == 0 and b % factor == 0:
            print factor
        else:
            factor += 1


def main():
    PrintCommonFactors(12, 18)

main()

