Zi Song's bound

Let $$S(n)$$ denote the sum of digits of the integer $$n$$. Over all positive integers, the minimum and maximum values of $$\frac {S(n)}{S(5n)}$$ are $$X$$ and $$Y$$ respectively. The value of $$X+Y$$ can be written as $$\frac {a}{b}$$, where $$a$$ and $$b$$ are coprime positive integers. What is the value of $$a+b$$?

This problem is proposed by Zi Song.

×