Extreme Value Theorem for Compact Spaces