a,b,c,d,e,f,g,h,temp:string;
shu,zu,jie:array[1..6] of integer;
begin
readln(a);
b:=’1990/5/18/10/20/0’;
if a=b then write(’0/0/0/0/0/0’)
else
begin
long:=length(a);
insert(’/’,a,long+1);
c:=a;
long1:=length(b);
insert(’/’,b,long1+1);
d:=b;
repeat
x:=pos(’/’,a);
e:=copy(a,1,x-1);
y:=pos(’/’,b);
f:=copy(b,1,y-1);
val(e,m,code);
val(f,n,code1);
if m<n then
begin
temp:=c;
c:=d;
d:=temp;
break;
end
else
begin
delete(a,1,x);
delete(b,1,y);
end;
until (a=’’)or(m<n);
repeat
inc(z);
x:=pos(’/’,c);
e:=copy(c,1,x-1);
y:=pos(’/’,d);
f:=copy(d,1,y-1);
val(e,m,code);
val(f,n,code1);
shu[z]:=m;
zu[z]:=n;
delete(c,1,x);
delete(d,1,y);
until(z=6);
for i:=6 downto 1 do
begin
if shu[i]>=zu[i] then
jie[i]:=shu[i]-zu[i]
else
begin
shu[i]:=shu[i]+24;
dec(shu[i-1]);
jie[i]:=shu[i]-zu[i];
end;
end;
for i:=6 downto 1 do
begin
str(jie[i],g);
insert(g,h,1);
insert(’/’,h,1);
end;
delete(h,1,1);
write(h);
end;
end.