Sharp bounds for Hardy type operators on higher-dimensional product spaces