Some error occured while loading page for you. Please try again.
Given two strings, and , determine if they share a common substring.
The first line contains a single integer, , denoting the number of pairs you must check.
Each pair is defined over two lines:
For each pair of strings, print YES on a new line if the two strings share a common substring; if no such common substring exists, print NO on a new line.
We have pairs to check: