#K67577. Forbidden Spell Combination

    ID: 32673 Type: Default 1000ms 256MiB

Forbidden Spell Combination

Forbidden Spell Combination

You are given a spell sequence and a forbidden combination of spell elements. Your task is to determine whether the forbidden combination appears in the spell sequence as a contiguous substring.

If the forbidden combination is found within the spell sequence, print YES. Otherwise, print NO.

Note that both inputs will be provided via standard input, with the first line containing the spell sequence and the second line containing the forbidden combination.

Example:

Input:
abracadabra
cad

Output: YES

</p>

inputFormat

The input consists of two lines:

  • The first line contains a non-empty string denoting the spell sequence.
  • The second line contains a non-empty string denoting the forbidden combination.

outputFormat

Output a single line containing YES if the forbidden combination is found in the spell sequence; otherwise, output NO.

## sample
abracadabra
cad
YES