Tow trains running at the rate of 75km and 60km an hour respectively on parallel rails in opposites directions, are to pass each other in 8 seconds and when they are running in the same direction at the same rates as before, a person sitting in the faster train observes that he passes the other in 33 seconds. Find the lengths of the trains.