var a:array of integer;
i,b:byte;
r,n:integer;
begin
write('Numere: ');
read(n);
if (n<1) or (n>2500) then exit else
setlength(a,n);
Write('Ratia: ');
read(r);
Writeln;
Writeln('Numerele:');
for i:=0 to n-1 do read(a[i]);
for i:=0 to n-1 do i<>0 then if a[i]-a[i-1]<>r then inc(b);
writeln;
if b<>0 then writeln('NU') else writeln('DA');
end.