100 atcoder#ABC221B. [ABC221B] typo
[ABC221B] typo
Score : points
Problem Statement
You are given two strings and . Determine whether it is possible to make and equal by doing the following operation at most once:
- choose two adjacent characters in and swap them.
Note that it is allowed to choose not to do the operation.
Constraints
- Each of and is a string of length between and (inclusive) consisting of lowercase English letters.
- and have the same length.
Input
Input is given from Standard Input in the following format:
Output
If it is possible to make and equal by doing the operation in Problem Statement at most once, print Yes
; otherwise, print No
.
abc
acb
Yes
You can swap the -nd and -rd characters of to make and equal.
aabb
bbaa
No
There is no way to do the operation to make and equal.
abcde
abcde
Yes
and are already equal.