import java.util.Arrays; import java.util.Scanner; public class No69 { public static void main(String[] args) { Scanner sc = new Scanner(System.in); String a = sc.next(); String b = sc.next(); String[] aArray = a.split(""); String[] bArray = b.split(""); Arrays.sort(aArray); Arrays.sort(bArray); if (Arrays.equals(aArray, bArray)) { System.out.println("YES"); } else { System.out.println("NO"); } sc.close(); } }