var t,e,n,f,o,r,y,s,i,x,r1,r2,r3,r4: integer; BEGIN for y:=0 to 9 do for n:=0 to 9 do if (((2*n+y) mod 10)=y) and (n<>y ) then begin r1:=((2*n+y) div 10); for t:=1 to 9 do if (t<>y) and (t<>n) then for e:=0 to 9 do if (e<>t) and (e<>n) and (e<>y) then if (((2*e+t+r1) mod 10)=t) then begin r2:=((2*e+t+r1) div 10); for r:=1 to 9 do if (r<>e)and(r<>t)and(r<>n)and(r<>y) then for x:=1 to 9 do if (x<>r)and(x<>e)and(x<>t)and(x<>n)and(x<>y) then if (((2*t+r+r2) mod 10) =x) then begin r3:=((2*t+r+r2) div 10); for o:=0 to 9 do if (o<>e)and(o<>t)and(o<>n)and(o<>y)and(o<>r)and(o<>x) then for i:=0 to 9 do if (i<>o)and(i<>e)and(i<>t)and(i<>n)and(i<>y)and(i<>r)and(i<>x) then if (((o+r3) mod 10)=i) then begin r4:=((o+r3) div 10); for f:=1 to 9 do if (f<>e)and(f<>t)and(f<>n)and(f<>y)and(f<>y)and(f<>r)and(f<>x)and(f<>o)and(f<>i) then for s:=1 to 9 do if (s<>o)and(s<>e)and(s<>t)and(s<>n)and(s<>y)and(s<>r)and(s<>x)and(s<>i)and(s<>f) then if (f+r4=s) then writeln (t,e,n, '+', t,e,n, '+',f,o,r,t,y, '=',s,i,x,t,y) end end end end END.