def sum(a,b):
     
    sum = 0
    for i in range (1,min(a,b)): 
        if (a % i == 0 and b % i == 0): 
            sum += i 
    return sum
def sum(a, b):
    sum = 0
    for VAR_0 in range(1, min(a, b)):
       
        if a % VAR_0 == 0 and b % VAR_0 == 0:
            sum += VAR_0
    return sum