James and Lily are working together to paint a fence. James can paint the entire fence in 8 hours, while Lily can do the same job in 12 hours. If they start painting together, how long will it take for them to complete painting the fence? Let's think step by step and output the final answer within \boxed{}.
user