import math
import functools


def lcm(*x):
    """
    Returns the least common multiple of its arguments. At least two arguments must be
    supplied
    """
    if not x or len(x) < 2:
        raise ValueError("at least two arguments must be supplied to lcm")
    lcm_of_2 = lambda x, y: (x * y) // math.gcd(x, y)
    return functools.reduce(lcm_of_2, x)