a= A*1000+ B*100+ 60 +C
b= D*1000+800+ E*10+ F
=>(dupa scimbarea cu 0)
c=A*1000+ B*100+ C =a-60
d=D*1000+ E*10+ F =b-800
c=8*d => a-60=8(b-800)
=> a=8*b-6340
a+b= 9977 => a=9977-b
a-8*b=-6340 => 9977-9*b=-6340 => -9*b=-6340-9977 => b=1813
=> a=9977-1813= 8165