100 atcoder#ABC221B. [ABC221B] typo

[ABC221B] typo

Score : 200200 points

Problem Statement

You are given two strings SS and TT. Determine whether it is possible to make SS and TT equal by doing the following operation at most once:

  • choose two adjacent characters in SS and swap them.

Note that it is allowed to choose not to do the operation.

Constraints

  • Each of SS and TT is a string of length between 22 and 100100 (inclusive) consisting of lowercase English letters.
  • SS and TT have the same length.

Input

Input is given from Standard Input in the following format:

SS

TT

Output

If it is possible to make SS and TT equal by doing the operation in Problem Statement at most once, print Yes; otherwise, print No.

abc
acb
Yes

You can swap the 22-nd and 33-rd characters of SS to make SS and TT equal.

aabb
bbaa
No

There is no way to do the operation to make SS and TT equal.

abcde
abcde
Yes

SS and TT are already equal.