Two trains 140 m and 160 m long run at the speed of 60 kmph and 40 kmph respectively in opposite directions on parallel tracks. The time (in seconds) which they take to cross each other, is: