A factory has two machines, A and B. Machine A can produce 12 units of a product in 3 hours, while Machine B can produce 18 units of the same product in 4 hours. If both machines work together for 8 hours, how many total units of the product will they produce? Let's think step by step and output the final answer within \boxed{}.
user