#K35707. Common Digit Checker
Common Digit Checker
Common Digit Checker
You are given two integers. Your task is to determine whether the two numbers share at least one common digit. If they do, print Yes
, otherwise print No
.
Details:
- The numbers can be any non-negative integers (including 0).
- Consider the digits of the numbers (in their usual decimal representation) and check if there exists at least one digit that appears in both numbers.
Note: Make sure your solution reads input from standard input (stdin) and writes the result to standard output (stdout).
inputFormat
The input consists of a single line containing two integers separated by spaces.
For example:
123 456
outputFormat
Output a single line containing either Yes
or No
depending on whether the two integers have a common digit.
123 456
No