Is this fraction non-terminating?

I recently stumbled upon an observation: the fraction $\frac{x}{y}$ terminates if and only if $y$ only has prime factors $2$ and $5$

For example:

$\frac{1}{20}=\frac{1}{2\cdot 2\cdot 5}=0.05$

$\frac{1}{6}=\frac{1}{2\cdot 3}=0.1\overline{6}$

I think this is true because fractions are in the form:

$\frac{a}{10}+\frac{b}{100}+\frac{c}{1000}+\dots $

$\frac{a}{2\cdot 5}+\frac{b}{2\cdot 2\cdot 5\cdot 5}+\frac{c}{2\cdot 2\cdot 2\cdot 5\cdot 5\cdot 5}+\dots $

How can I rigorously prove this?\

I recently stumbled upon an observation: the fraction $\frac{x}{y}$ terminates if and only if $y$ only has prime factors $2$ and $5$

For example:

$\frac{1}{20}=\frac{1}{2\cdot 2\cdot 5}=0.05$

$\frac{1}{6}=\frac{1}{2\cdot 3}=0.1\overline{6}$

I think this is true because fractions are in the form:

$\frac{a}{10}+\frac{b}{100}+\frac{c}{1000}+\dots $

$\frac{a}{2\cdot 5}+\frac{b}{2\cdot 2\cdot 5\cdot 5}+\frac{c}{2\cdot 2\cdot 2\cdot 5\cdot 5\cdot 5}+\dots $

How can I rigorously prove this?\