The greatest four digit number that can be formed by the digits 4, 5, 7, 9 (repetition of digits is allowed).