4039 in words is written as :

Four Thousand Thirty Nine