How to recover contacts from broken iphone 5c

My iphone 5c is showing a blank screen, but I can still talk to Siri. I have iOS 10. I need to recover my contacts and photos from the phone, but when I plug it into a computer it asks me to select "trust computer" on the phone. As the screen is blank and unresponsive, I cannot do that. Is there a way to recover my contacts and photos?
Try rebooting your device to see if the screen comes back on. If it doesn't you can always go to iCloud.com to retrieve your contacts and photos but this will only work if you had iCloud turned on on your phone.

Original thread: https://forums.imore.com/threads/how-to-recover-contacts-from-broken-iphone-5c.379529/