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". 
import java.io.*;
import java.util.*;

public class Main {
    private static IO io;

    public static void main(String [] args) throws IOException{
        new Main().run();
    }

    private void run() throws IOException {//false -> file ; true -> stdio
        boolean mode = System.getProperty("ONLINE_JUDGE")!=null;
        io = new IO(mode);
        if(!mode){
            System.out.println("File output : \n<start>");
            System.out.flush();
        }
        solve();
        io.flush();
        if(!mode){
            System.out.println("</start>");
            System.out.flush();
        }
    }
    
    private void solve() throws IOException {
        char s1[] = io.nS().toCharArray(), s2[] = io.nS().toCharArray();
        int k = 0, t1 = 0, t2 = 0;
        if(s1.length == s2.length){
            for(int i = 0; i<s1.length; i++)
                if(s1[i]!=s2[i]){
                    k++;
                    t1 = t2; t2 = i;
                }
            if(k==2)
                if(s1[t1] == s2[t2] && s1[t2] == s2[t1]){
                    io.wln("YES"); return;
                }
        }
        io.wln("NO");
    }// 2.2250738585072012e-308

    /**
     * Input-output class
     * @author master_j
     * @version 0.1.0
     */
    @SuppressWarnings("unused")
    private class IO{
        StreamTokenizer in; PrintWriter out; BufferedReader br; Reader reader; Writer writer;
        public IO(boolean oj) throws IOException{
            Locale.setDefault(Locale.US);
            reader = oj ? new InputStreamReader(System.in) : new FileReader("input.txt");
            writer = oj || !oj ? new OutputStreamWriter(System.out) : new FileWriter("output.txt");
            br = new BufferedReader(reader);
            in = new StreamTokenizer(br);
            out = new PrintWriter(writer);
        }
        public void wln(){out.println();}
        public void wln(int arg){out.println(arg);}
        public void wln(long arg){out.println(arg);}
        public void wln(double arg){out.println(arg);}
        public void wln(String arg){out.println(arg);}
        public void wln(boolean arg){out.println(arg);}
        public void wln(char arg){out.println(arg);}
        public void wln(float arg){out.println(arg);}
        public void wln(Object arg){out.println(arg);}
        public void w(int arg){out.print(arg);}
        public void w(long arg){out.print(arg);}
        public void w(double arg){out.print(arg);}
        public void w(String arg){out.print(arg);}
        public void w(boolean arg){out.print(arg);}
        public void w(char arg){out.print(arg);}
        public void w(float arg){out.print(arg);}
        public void w(Object arg){out.print(arg);}
        public void wf(String format, Object...args){out.printf(format, args);}
        public void flush(){out.flush();}
        public int nI() throws IOException {in.nextToken(); return(int)in.nval;}
        public long nL() throws IOException {in.nextToken(); return(long)in.nval;}
        public String nS() throws IOException {in.nextToken(); return in.sval;}
        public double nD() throws IOException {in.nextToken(); return in.nval;}
        public float nF() throws IOException {in.nextToken(); return (float)in.nval;}
        public void wc(char...a){for(char c : a){in.ordinaryChar(c);in.wordChars(c, c);}}
        public void wc(char c1, char c2){in.ordinaryChars(c1, c2); in.wordChars(c1, c2);}
    }
}