#K83942. Check Pattern in String

    ID: 36309 Type: Default 1000ms 256MiB

Check Pattern in String

Check Pattern in String

This problem requires you to determine if a given pattern exists as a substring within a given string. You are provided with multiple datasets. Each dataset consists of two lines: the first line is the string and the second line is the pattern to be searched.

The input terminates with a line containing "END". For each dataset, output "YES" if the pattern exists in the string, otherwise output "NO".

Note: The check is case-sensitive.

inputFormat

The input is read from standard input (stdin) and consists of multiple lines. Each dataset is formed by two consecutive lines, the first being the string and the second the pattern. The end of input is signaled by a line containing only "END". There will be at least one dataset.

outputFormat

For each dataset, output a single line to standard output (stdout) - "YES" if the pattern is found within the string, or "NO" otherwise.

## sample
HelloWorld
World
END
YES