program ;
uses crt;
var
i,a,s1,s2:integer;
begin
read(a);
for i:= 1 to a do
if i mod 2 = 0 then s2:=s2+i else s1:=s1=i;
writeln(s1,s2);
end.
var d,a,s1,s2:integer;
Begin
Read(a);
While a>0 do begin
d:=a mod 10;
if d mod 2 =0 then s2:=s2+d
else
s1:=s1+d;
a:=a div 10;
end;
writeln(s1,' ',s2);
End.
program ;
uses crt;
var
i,a,s1,s2:integer;
begin
read(a);
for i:= 1 to a do
if i mod 2 = 0 then s2:=s2+i else s1:=s1=i;
writeln(s1,s2);
end.
var d,a,s1,s2:integer;
Begin
Read(a);
While a>0 do begin
d:=a mod 10;
if d mod 2 =0 then s2:=s2+d
else
s1:=s1+d;
a:=a div 10;
end;
writeln(s1,' ',s2);
End.