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.
def Multiplos(n):
    numero=n
    divisor=1
    listaDeTuplas=[]
    resultado=float("inf")
    while(divisor<=resultado):
        if numero%divisor==0:
            resultado=numero//divisor
            tupla=(divisor,resultado)
            listaDeTuplas.append(tupla)
        divisor=divisor+1
    return listaDeTuplas
# pensar en los tres tipos de entrada
# entrada la mejor de los casos
areas=input().split()
contador=0
for area in areas:
    numero=int(area)
    areas[contador]=numero
    contador=contador+1
ListaPrimerN=Multiplos(areas[0])
ListaSegundoN=Multiplos(areas[1])


flag = False
respuesta = 0

for i in range(len(ListaPrimerN)):
    for j in range(len(ListaSegundoN)):
        if ListaPrimerN[i][0]== ListaSegundoN[j][0]:
            multi = ListaPrimerN[i][1]*ListaSegundoN[j][1]
            if multi == areas[2]:
                flag = True
                respuesta = 4*(ListaPrimerN[i][0]+ListaPrimerN[i][1]+ListaSegundoN[j][1])
                break
            else:
                break

    if flag:
        print(respuesta)
        break


			  	 	 	   	 	   	 	 	 	  		