Two trains A and B are running in the opposite directions. Train A crosses a man standing on the platform in 27 seconds, while train B crosses the same man in 17 seconds. If they cross each other in 23 seconds, then the ratio of speed of train A to that of train B is: