Machines X and Y run at different constant rates, and machine X can complete a certain job in 9 hours. Machine X worked on the job alone for the first 3 hours and the two machine working together, then completed the job in 4 more hours. How many hours would it have taken machine Y, working alone, to complete the entire job?