Hello.
You are still fine.
Suppose your output is n/m. You can find the common factors for n and m one by one. If a factor say 'f' is found then reduce both n and m by f. With this you can...