awk -M '\
function gcd(a, b,  tmp)
{
    if(a<b){tmp=a;a=b;b=tmp}
    if(b == 0)return a;
    return gcd(b, a%b);
}
function lcm(a, b)
{
    return a * b / gcd(a, b);
}
NR==1{N=$1}
NR>1{A[NR-1]=$1}
END{
    ans = 1
    for(i in A){
        ans = lcm(ans, A[i])
    }
    print ans
}'