As someone who started watching Yao when I was a few years of age, I think he's an okay fit next to Hakeem. Yao was deceptively quick-he had the mobility to cover the perimeter a wee bit with his massive size, and can keep up with the behemoths inside. His passing was never an outlet machine, but was very good in half court sets where he'd catch the ball in the low/mid/high post, with nifty overhead and behind the back passes in his arsenal. His outside shooting also helps with spacing.
With that being said, I don't love the fit with him and Hakeem. Both need the ball in the post to be the best they can be, and if you're using either of them as a floor spacer you're wasting their skillsets.