while 1: _=raw_input();a,b=map(int,_.split('/'));_+=' =' while a:x=-(-b/a);a=a*x-b;b*=x;_+=" 1/%d +"%x print _[:-2]