def factorize(n, primes):
    """
    Return the prime factors of the num n
    as string including 1 ie. for n=4; 1 x 2 x 2
    """
    factors = ["1"]
    while primes[n] != 0 and n % primes[n] == 0: 
        # n is not prime and n is divisible by f
        factors.append(str(primes[n]))
        n = n // primes[n]
    if n != 1:        
        factors.append(str(n))
    return " x ".join(factors)