UPS with high input power factor