Problem B: Containment trees
----------------------------

In the computer science world, we often have to deal with containment
trees. For example, the Linux filesystem (ignoring symbolic links) can
be viewed as a containment tree. Its root would be /, and each directory
is transitively contained under the root. 

One way to represent a containment tree is in the following format: For
a directory called child, contained in a directory called parent, we
include one line that reads:

contain parent child

As a result, the filesystem containment tree might look like:

contain / usr
contain / home
contain usr lib
contain home john

There are of course many more facts like this.

For this problem, you will be given a set of lines like the above (the
first token will always be contain). Your program will have to decide if
these lines represent a containment tree, and what is the root of the
tree. You can assume that there are no directed cycles in the input.

Input
-----

The input will contain a number of lines like the above. There will
always be at least one line of input.


Output
------

The output should consist of one or two lines. The first line should be
YES if the input was a containment tree and NO otherwise. If the first
line, was YES, then the second line must contain the name of the root. 
In the example above, the output should be:

YES
/

Sample Input
------------

contain root1 a
contain root2 b

Sample Output
-------------

NO