Using min of height & width