import algorithm var a,b = readLine stdin a.sort cmp b.sort cmp echo if a == b: "YES" else: "NO"