Some dwarves that are finishing the StUDY (State University for Dwarven Youngsters) Bachelor courses, have been told "no genome, no degree". That means that all dwarves should write a thesis on genome. Dwarven genome is far from simple. It is represented by a string that consists of lowercase Latin letters.

Dwarf Misha has already chosen the subject for his thesis: determining by two dwarven genomes, whether they belong to the same race. Two dwarves belong to the same race if we can swap two characters in the first dwarf's genome and get the second dwarf's genome as a result. Help Dwarf Misha and find out whether two gnomes belong to the same race or not.

Input

The first line contains the first dwarf's genome: a non-empty string, consisting of lowercase Latin letters.

The second line contains the second dwarf's genome: a non-empty string, consisting of lowercase Latin letters.

The number of letters in each genome doesn't exceed 105. It is guaranteed that the strings that correspond to the genomes are different. The given genomes may have different length.

Output

Print "YES", if the dwarves belong to the same race. Otherwise, print "NO".

Examples

Input

ab
ba


Output

YES


Input

aa
ab


Output

NO

Note

  * First example: you can simply swap two letters in string "ab". So we get "ba". 
  * Second example: we can't change string "aa" into string "ab", because "aa" does not contain letter "b". 
  //package main;
import java.io.*;
import java.math.*;
import java.util.*;

/**
* 
* @author Togrul Gasimov (ttogrul30@gmail.com)
*         Created on 13.09.2013
*/

public class Main {
public static void main(String[] args) /*throws FileNotFoundException*/ { 
   InputStream inputStream = System.in;
   OutputStream outputStream = System.out;
   FastScanner in = new FastScanner(inputStream);
   FastPrinter out = new FastPrinter(outputStream);
   TaskA solver = new TaskA();
   solver.solve(1, in, out);
   out.close();
}
}

class TaskA{
public void solve(int testNumber, FastScanner scan, FastPrinter out) /*throws FileNotFoundException*/ {
   //Scanner sscan = new Scanner(new File("input.txt"));
   //PrintStream oout = new PrintStream(new File("output.txt"));
   String s1 = scan.next(), s2 = scan.next();
   if(s1.length() != s2.length()){
       out.println("NO"); out.close(); System.exit(0);
   }
   String x1 = "", x2 = "";
   s2 = s2.substring(0, s1.length());
   for(int i = 0; i < s1.length(); i++){
   if(s1.charAt(i) != s2.charAt(i)){
       x1 += s1.charAt(i); x2 += s2.charAt(i);
       if(x1.length() == 3){
           out.println("NO"); 
           out.close(); System.exit(0);
       }
   } 
   }
   if(x1.length() == 2 && x2.equals("" + x1.charAt(1) + x1.charAt(0)) ){
     out.println("YES");  
   }else{
       out.println("NO");
   }
   
   //sscan.close();
   //oout.close();
}
}

class FastScanner extends BufferedReader {
public FastScanner(InputStream is) {
   super(new InputStreamReader(is));
}

public int read() {
   try{
       int ret = super.read();
       return ret; 
   }catch(Exception e){
       throw new InputMismatchException();
   }
}

public String next() {
   StringBuilder sb = new StringBuilder();
   int c = read();
   while (isWhiteSpace(c)) {
       c = read();
   }
   if (c < 0) {
       return null;
   }
   while (c >= 0 && !isWhiteSpace(c)) {
       sb.appendCodePoint(c);
       c = read();
   }
   return sb.toString();
}

static boolean isWhiteSpace(int c) {
   return c >= 0 && c <= 32;
}

public int nextInt() {
   int c = read();
   while (isWhiteSpace(c)) {
       c = read();
   }
   int sgn = 1;
   if (c == '-') {
       sgn = -1;
       c = read();
   }
   int ret = 0;
   while (c >= 0 && !isWhiteSpace(c)) {
       if (c < '0' || c > '9') {
           throw new NumberFormatException("digit expected " + (char) c
                   + " found");
       }
       ret = ret * 10 + c - '0';
       c = read();
   }
   return ret * sgn;
}

public long nextLong() {
   return Long.parseLong(next());
}

public double nextDouble() {
   return Double.parseDouble(next());
}

public BigInteger nextBigInteger() {
   return new BigInteger(next());
}

public BigDecimal nextBigDecimal(){
   return new BigDecimal(next());
}

public String readLine(){
   try{
       return super.readLine();
   }catch(IOException e){
       return null;
   }
}
}

class FastPrinter extends PrintWriter {

public FastPrinter(OutputStream out) {
   super(out);
}
public FastPrinter(Writer out) {
   super(out);
}
}