Note that a string $a$ is a substring of a string $b$ if $a$ can be obtained from $b$ by deleting zero or more characters from the beginning and zero or more characters from the end.

In the first test, all pairs of strings satisfying the conditions are (``\t{01}'', ``\t{10}''), (``\t{01}'', ``\t{11}''), (``\t{10}'', ``\t{01}''), (``\t{10}'', ``\t{11}''), (``\t{11}'', ``\t{01}''), and (``\t{11}'', ``\t{10}'').