Medium
Nothing in Common?
Read two lines of words. Print
Yes if they share no word (use isdisjoint()), otherwise print the shared words sorted on one line.Input
Two lines.
Output
One line.
Sample 1
Input
a b c d
Output
Yes
Sample 2
Input
a b c c a
Output
a c
Output appears here