Hello,Customer and welcome to Just Answer,
NO! IT IS NOT SAFE.
Bacteria begin to grow quickly, and the ham most certainly is not safe to eat at all now. Unfortunately, all you can do is throw it away. It is not even safe to give it to animals (and the salty nature of ham is also unhealthy for dogs and cats).
I have done something similar myself . . . several times. I know how hard it is to have to throw out food like this. I have wanted to kick myself when I did it. But, honestly, it is very, very dangerous to eat food that has been left out, particularly meat.
Check out #4 on this website by the FDA:
I hope this answers your question, but if you need more information about this please let me know. Thanks for trusting Just Answer.