Crowded and unsafe buildings in cities