Determine the longest rod which can measure the three dimensions of the room exactly

Determine the longest rod which can measure the three dimensions of the room exactly.