Please note, this is a STATIC archive of website www.tutorialspoint.com from 11 May 2019, cach3.com does not collect or store any user information, there is no "phishing" involved.
Program NoName;
Var
b,x,z,c,v,q,w,e:integer;
n:array [ 1..3 ] of integer;
s:array [ 1..6 ] of integer;
a:array [ 1..7 ] of boolean;
Begin
b:=1; a[7]:=false;
for x:=1 to 6 do
Begin
ReadLn( s[x]);
a[x]:=false;
end;
for z:=1 to 4 do
for x:=z+1 to 5 do
for c:=x+1 to 6 do
Begin
a[z]:=true;
a[x]:=true;
a[c]:=true;
for v:=1 to 6 do
if a[v]=false then
Begin
n[b]:=v;
b:=b+1;
end;
q:=n[1];
w:=n[2];
e:=n[3];
b:=1;
for v:=1 to 3 do
n[v]:=0;
if s[z]+s[x]+s[c]=s[q]+s[w]+s[e] then
a[7]:= true;
for v:=1 to 6 do
a[v]:=false;
end;
If a[7]=false then
WriteLn( 'NO' )
else
WriteLn( 'YES' );
end.
Advertisements
We use cookies to provide and improve our services. By using our site, you consent to our Cookies Policy.
AcceptLearn more