Two trains can run at a speed of 54 km/hr and 36 km/hr on a parallel tracks. When they are running in opposite directions they pass each other in 10 s, when they move in the same direction a person sitting in the faster train crosses the other train in 30 s. Find the length of the trains ( faster and slower respectively ).