Output formatting – Mathematica Stack Exchange

Is it possible to format a mathematical output so that all the fractional numbers are written first followed by other constants or functions?

Example:

output = 12/7 * x + 120/17 * x * y 

or

output = (12 * x) / 7 + 120/17 * x * y

that when saved in a file it becomes

(12 * x) / 7 + (120 * x * y) / 17

However, I asked that the output be formatted in the following way

12/7 * x + 120/17 * x * y