uses crt; var i,j,k,n,sum:integer; a:array[1..100] of integer; flag:boolean; begin flag:=false; writeln('Input N'); read(n); writeln('Input elements'); for i:=1 to n do read(a[i]); for i:=1 to n do for j:=1 to n do for k:=1 to n do if (i<>j) and (j<>k) and (i<>k) then if a[i]+a[j]+a[k]=0 then begin writeln('Yes'); flag:=true; halt; end; if flag=false then writeln('No'); end.
var i,j,k,n,sum:integer;
a:array[1..100] of integer;
flag:boolean;
begin
flag:=false;
writeln('Input N');
read(n);
writeln('Input elements');
for i:=1 to n do
read(a[i]);
for i:=1 to n do
for j:=1 to n do
for k:=1 to n do
if (i<>j) and (j<>k) and (i<>k) then
if a[i]+a[j]+a[k]=0 then
begin
writeln('Yes');
flag:=true;
halt;
end;
if flag=false then
writeln('No');
end.