There are two stations of length 162 meters and 120 meters respectively. A train takes 18 seconds to pass first station and 15 seconds to pass another station. Determine the length of the train?