The number 31989 (thirty-one thousand nine hundred eighty-nine) is written in Roman numerals as follows: XXXICMLXXXIX