Ensure that you are logged in and have the required permissions to access the test.
You are given two strings s and t of length n. You can select any two positions (can be from the same or different strings) and swap the characters at those two positions. You have to perform this operation exactly once in such a way that there exists maximum one position i (1≤i≤n) such that si!=ti.
Determine whether it is possible to perform the operation such that the given condition holds or not.
Input format
Output format
For each test case, print YES if a valid operation exists otherwise print NO in a single line.
Input constraints
In the first test case, we can get a valid result by swapping the characters s3 and t8 (1 based indexing).