import java.util.*;enum N{N;System z;int n;{for(Scanner s=new Scanner(z.in);(n=s.nextInt())>0;)z.out.printf(n+" = 6 * %d %c 1\n",++n/6,45-n%6);}}