Viruses#2466

Viruses

1 second
64 megabytes
Very easy

The Committee for Binary Virus Research has discovered that certain sequences of zeros and ones are virus codes. The committee has identified a set of virus codes. A sequence of zeros and ones is called safe if none of its substrings (that is, contiguous segments) matches any virus code. The committee's current task is to determine whether there exists an infinite safe sequence of zeros and ones.

Input

The first line contains an integer , the number of virus codes. Each of the next lines contains a non-empty string composed of the characters and —a virus code. The total length of all strings does not exceed .

Output

The first and only line of the output should contain one word:

  • YES — if there exists an infinite safe sequence of zeros and ones;

  • NO — otherwise.

Examples

Example 1

Loading
Loading