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.
# http://codeforces.com/problemset/problem/224/A

"""
You know the area of the three faces of a parallelepiped. Find it's perimeter (sum of edge lengths)

Rectangular parallelepiped is just a cuboid.

So areas are xy, xz, yz and we want 4(x+y+z) for perimeter

We also know that the edge lengths are integers
"""

import sys

areas = list(map(int, sys.stdin.readline().split()))

def main():

    # Check all the cases
    for i in range(3):
        A = areas.copy()
        xy = A.pop(i)
        for j in range(2):
            B = A.copy()
            xz = B.pop(j)
            yz = B.pop()

        # Solve the simultaneous
        x, y, z = (xy * xz / yz) ** 0.5, (xy * yz / xz) ** 0.5, (xz * yz / xy) ** 0.5

        if x % 1 == 0 and y % 1 == 0 and z % 1 == 0:
            sys.stdout.write(str(int(4*(x+y+z))))
            return True

if __name__ == '__main__':
    main()