def prime_factor_decomposition(num):
    """
    Prime factor decomposition of a number.
    :param num: input number.
    :return: all prime factors of input number.
    """
    primes = [2]
    for i in range(3, num):
        if i * i > num:
            break
        flag = True
        for j in primes:
            if i % j == 0:
                flag = False
                break
            if j * j > i:
                break
        if flag:
            primes.append(i)
    factor = []
    for i in primes:
        if i * i > num:
            break
        while num % i == 0:
            factor.append(i)
            num = num // i
    if num != 1:
        factor.append(num)
    return factor