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.
import io,os,sys
input = io.BytesIO(os.read(0,os.fstat(0).st_size)).readline

def solve():
    arr = list(map(int,input().split()))
    a,b = 1,1
    while a < 101:
        while b < 101:
            temp = arr + []
            if a * b in temp:
                temp.remove(a * b)
            if temp[0] % a == 0 and temp[1] % b == 0:
                if temp[0] // a == temp[1] // b:
                    return 4 * (a + b + temp[0] // a)
            if temp[1] % a == 0 and temp[0] % b == 0:
                if temp[1] // a == temp[0] // b:
                    return 4 * (a + b + temp[1] // a)
            b += 1
        a += 1
        b = 1
    return 4 * (a + b + c)
#for i in range(int(input())):
sys.stdout.write(str(solve())+'\n') 