#NEWLINE# def estimate_size( sizes ) : #NEWLINE# #INDENT# a = sum ( ( ( w * h ) for ( w , h ) in sizes ) ) #NEWLINE# mw = max ( ( w for ( w , h ) in sizes ) ) #NEWLINE# mh = max ( ( h for ( w , h ) in sizes ) ) #NEWLINE# w1 = pot ( h2 ) #NEWLINE# h1 = pot ( mh ) #NEWLINE# w2 = pot ( ( a ** 0.5 ) ) #NEWLINE# h2 = pot ( ( float ( a ) / w2 ) ) #NEWLINE# return ( max ( w1 , w2 ) , max ( h1 , h2 ) )