Multiplying with n to avoid floating point arithmetic .
p [ 0 ] *= n ; NEW_LINE p [ 1 ] *= n ; NEW_LINE for i in range ( n ) : NEW_LINE INDENT mid [ 0 ] += a [ i ] [ 0 ] ; NEW_LINE mid [ 1 ] += a [ i ] [ 1 ] ; NEW_LINE a [ i ] [ 0 ] *= n ; NEW_LINE a [ i ] [ 1 ] *= n ; NEW_LINE DEDENT