Two-Step Semidefinite Programming approach to clustering and dimensionality reduction