You are given strings S and T consisting of lowercase English letters.

You can perform the following operation on S any number of times:

Operation: Choose two distinct lowercase English letters c_1 and c_2, then replace every occurrence of c_1 with c_2, and every occurrence of c_2 with c_1.

Determine if S and T can be made equal by performing the operation zero or more times.

Constraints

* 1 \leq |S| \leq 2 \times 10^5
* |S| = |T|
* S and T consists of lowercase English letters.

Input

Input is given from Standard Input in the following format:


S
T


Output

If S and T can be made equal, print `Yes`; otherwise, print `No`.

Examples

Input

azzel
apple


Output

Yes


Input

chokudai
redcoder


Output

No


Input

abcdefghijklmnopqrstuvwxyz
ibyhqfrekavclxjstdwgpzmonu


Output

Yes
import java.util.HashMap;
import java.util.Map;
import java.util.Scanner;

public class Main {
    public static final String YES = "Yes";
    public static final String NO = "No";

    public static String process(TestCase testCase) {
        final String S = testCase.S;
        final String T = testCase.T;

        Map<Character, Integer> sCharFreq = countCharFrequencies(S);
        Map<Character, Integer> tCharFreq = countCharFrequencies(T);

        Map<Integer, Integer> sFreqMap = toFreqMap(sCharFreq);
        Map<Integer, Integer> tFreqMap = toFreqMap(tCharFreq);

        return sFreqMap.equals(tFreqMap) ? YES : NO;
    }

    private static Map<Character, Integer> countCharFrequencies(String str) {
        Map<Character, Integer> map = new HashMap<>();
        str.chars().mapToObj(i -> (char) i).forEach(c -> {
            if (map.containsKey(c)) {
                map.put(c, map.get(c) + 1);
            } else {
                map.put(c, 1);
            }
        });
        return map;
    }

    private static Map<Integer, Integer> toFreqMap(Map<Character, Integer> charFreq) {
        Map<Integer, Integer> map = new HashMap<>();
        charFreq.values().forEach(c -> {
            if (map.containsKey(c)) {
                map.put(c, map.get(c) + 1);
            } else {
                map.put(c, 1);
            }
        });
        return map;
    }

    // Util func

    public static void main(String[] args) {
        TestCase testCase = readFromInput();

        final String result = process(testCase);

        output(result);
    }

    private static TestCase readFromInput() {
        Scanner sc = new Scanner(System.in);

        String S = sc.next();
        String T = sc.next();

        return new TestCase(S, T);
    }

    private static void output(String result) {
        System.out.println(result);
    }

    public static class TestCase {
        final String S;
        final String T;

        public TestCase(String S, String T) {
            this.S = S;
            this.T = T;
        }
    }
}
