"use strict";
function Main(input) {
    let lines = input.split("\n");
    let s = lines[0];
    let t = lines[1];
// console.log(`len: ${s.length}`);
    const a = 'a'.charCodeAt(0);
    let sa = new Array(26).fill(0);
    let ta = new Array(26).fill(0);
    for (let n = 0; n < s.length; n++) {
        sa[s.charCodeAt(n) - a] += 1;
        ta[t.charCodeAt(n) - a] += 1;
    }
    for (let n = 0; n < sa.length; n++) {
        if (Math.abs(sa[n] - ta[n]) % 2 != 0 ) {
            console.log('No');
            return;
        }
    }
    console.log('Yes');
}
Main(require("fs").readFileSync("/dev/stdin", "utf8"));
