407149: GYM102697 120 What the Frac (Easier Version)
Description
Your 5-year-old cousin from the CodeRams Contest #5 (Problem 4) is now in 4th grade, and he is learning how to simplify fractions. Unfortunately, he doesn't really understand them, and he needs your help in simplifying fractions.
For this problem, you must write a program to convert a fraction $$$a$$$/$$$b$$$ to simplest form. For example, if the fraction was $$$6$$$/$$$8$$$, you can factor out a $$$2$$$, and the fraction simplifies to $$$3$$$/$$$4$$$, which is in simplest form.
InputThe only line of input contains a single fraction $$$a$$$/$$$b$$$: the fraction you need simplify. $$$a$$$/$$$b$$$ can be greater than one, but $$$a$$$ will not be a multiple of $$$b$$$. So $$$3$$$/$$$2$$$ would be a valid input, but $$$6$$$/$$$2$$$ would not.
OutputOutput a single fraction $$$c$$$/$$$d$$$ in the same format as the input: the input fraction, in simplest form, as described above.
ExamplesInput6/8Output
3/4Input
72/48Output
3/2Input
37/73Output
37/73Note
In this problem, the input will be small enough for a brute force solution that tries all factors to run efficiently.