program bilet;
uses crt;
var a,b,c,d,s,n,k:real;
begin
write('vvedite chislo');
readln(k);
a:=k div 1000;
b:=k div 100 mod 10;
c:=k div 10 mod 100
d:=k mod 10;
s:=a+b;
n:=c+d;
if s=n then writeln('bilet schastlivy') else writeln('bilet ne schastlivy');
readln;
end.
program bilet;
uses crt;
var a,b,c,d,s,n,k:real;
begin
write('vvedite chislo');
readln(k);
a:=k div 1000;
b:=k div 100 mod 10;
c:=k div 10 mod 100
d:=k mod 10;
s:=a+b;
n:=c+d;
if s=n then writeln('bilet schastlivy') else writeln('bilet ne schastlivy');
readln;
end.