#abc303a. [abc303_a]Similar String
[abc303_a]Similar String
Problem Statement
Two characters and are called similar characters if and only if one of the following conditions is satisfied:
- and are the same character.
- One of and is
1
and the other isl
. - One of and is
0
and the other iso
.
Two strings and , each of length , are called similar strings if and only if:
- for all , the -th character of and the -th character of are similar characters.
Given two length- strings and consisting of lowercase English letters and digits, determine if and are similar strings.
Constraints
- is an integer between and .
- Each of and is a string of length consisting of lowercase English letters and digits.
Input
The input is given from Standard Input in the following format:
Output
Print Yes
if and are similar strings, and No
otherwise.
Sample Input 1
3
l0w
1ow
Sample Output 1
Yes
The -st character of is l
, and the -st character of is 1
. These are similar characters.
The -nd character of is 0
, and the -nd character of is o
. These are similar characters.
The -rd character of is w
, and the -rd character of is w
. These are similar characters.
Thus, and are similar strings.
Sample Input 2
3
abc
arc
Sample Output 2
No
The -nd character of is b
, and the -nd character of is r
. These are not similar characters.
Thus, and are not similar strings.
Sample Input 3
4
nok0
n0ko
Sample Output 3
Yes