var a, b, c: string; i, j, al, bl: integer; res: boolean; begin write('Ââåäèòå ïåðâóþ ñòðîêó: '); readln(a); write('Ââåäèòå âòîðóþ ñòðîêó: '); readln(b); al := length(a); bl := length(b); for i := 1 to al - bl + 1 do begin c := ''; for j := i to i + bl - 1 do c := c + a[j]; if b = c then begin res := true; break; end; end; if res = true then writeln('YES') else writeln('NO'); end.