uses crt;
var a:array[1..300]of integer;
i,n,dem,kt,t:integer;
begin
clrscr;
write('Nhap n='); readln(n);
for i:=1 to n do
begin
write('A[',i,']='); readln(a[i]);
end;
dem:=0;
for i:=1 to n do
if a[i] mod 3=0 then inc(dem);
t:=abs(a[2]-a[1]);
kt:=0;
for i:=1 to n do
if t<>abs(a[i]-a[i-1]) then
begin
kt:=1;
break;
end;
if kt=0 then writeln('Day la cap so cong')
else writeln('Day khong la cap so cong');
readln;
end.