Ratio simplification

#1
Hello everyone.

I am looking for a formula to get a simplified ratio

for example 8:4 ->2:1 is easy

but lets say, 4891:1558, whats the most simplified ratio you can get.