for(c<-"0"*10;s=readLine;a=Seq(-1,1);i<-a;j<-a)if(s(0)%c+s(4)%c*i+s(8)%c*j==s.drop(12).toInt)println(s updated(2,"- +"(i+1))updated(6,"- +"(j+1)))