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 sys
import math
from collections import deque,Counter
from sys import stdin

#sys.setrecursionlimit(10**7)

int1=lambda x: int(x)-1
stinput=lambda :stdin.readline()[:-1]
ii=lambda :int(stinput())
mi=lambda :map(int, stdin.readline().split())
li=lambda :list(mi())
mi1=lambda :map(int1, stdin.readline().split())
li1=lambda :list(mi1())
mis=lambda :map(str, stdin.readline().split())
lis=lambda :list(mis())

from collections import defaultdict
#d=defaultdict(int)
#d=defaultdict(lambda:1)

import heapq
#heapq.heapify(hq)
#heapq.heappop(hq)
#heapq.heappush(hq,1)

mod=10**9+7
Mod=998244353
INF=10**18
ans=0

a,b,c=mi()
div=[]
for i in range(1,a+1):
  if a%i==0:
    div.append(i)

for i in div:
  j=a//i
  if b%i==0 and c%j==0:
    ans=i+j+b//i
    print(4*ans)