Cluster analysis by the K-means algorithm and simulated annealing