while(<>){chomp;$r=$_%6;$t=$r==5?$_+1:$_-1; printf("%d = 6 * %d %s 1\n",$_,$t/6,$r==5?"-":"+")}