Flying while pregnant

Sophia
My cousin in Greece is getting married in September, I want to go but I will be about 36 weeks. Is it safe to fly while being that far along?