A boat covers 32 km upstream and 36 km downstream in 7 hours. Also, it covers 40 km upstream and 48 km downstream in 9 hours. Find the speed of the boat in still water and that of the stream.