You've got a rectangular parallelepiped with integer edge lengths. You know the areas of its three faces that have a common vertex. Your task is to find the sum of lengths of all 12 edges of this parallelepiped.
The first and the single line contains three space-separated integers — the areas of the parallelepiped's faces. The area's values are positive ( &gt; 0) and do not exceed 10<sup class="upper-index">4</sup>. It is guaranteed that there exists at least one parallelepiped that satisfies the problem statement.
from math import *

def mdc(num1, num2):
    rest = None
    if(num1 == num2):
        return  int(num1/2)
    while (rest != 0):
        rest = num1 % num2
        num1  = num2
        num2  = rest

    return num1

a,b,c = map(int,input().split())

lado1 = mdc(a,b)
#print(lado1)
lado2 = mdc(a,c)
#print(lado2)
lado3 = int(b/lado2)
#print(lado3)
result = ((lado1*4)+(lado2*4)+(lado3*4))
print(result)
