We’re preparing your current view and syncing the latest data.
You are given two strings of equal length. Your task is to determine whether it is possible to make the two strings equal by swapping exactly two letters in the first string (swapping a letter with itself is allowed). If it is possible, print "YES", otherwise print "NO".
Formally, you want to check if there exist indices i and j (1 ≤ i, j ≤ length of string) such that swapping the characters at positions i and j in the first string makes it identical to the second string.
The first line contains a single integer n (1 ≤ n ≤ 100) — the length of the strings. The second line contains the first string s of length n. The third line contains the second string t of length n.
Print "YES" if it is possible to make the first string equal to the second string by exactly one swap of two letters. Otherwise, print "NO".
1 ≤ n ≤ 100 Strings consist of lowercase English letters.
Example 1
Input
4 abaa aaba
Output
YES
Explanation
Swapping the second and fourth characters in the first string transforms 'abaa' into 'aaba'.
Example 2
Input
2 aa bb
Output
NO
Explanation
No single swap can make 'aa' equal to 'bb'.
Example 3
Input
3 aaa aaa
Output
YES
Explanation
Strings are already equal, and swapping any two identical characters keeps it the same.