To your close friends or someone younger
To someone in a higher position / acquaintance
Doctor / Nurse will say those to you when you leave a clinic or hospital.
This is polite enough when you say it to someone. However, you can add more politeness by using the sentence below.