package no069; import java.util.Arrays; import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); char[] a = sc.next().toCharArray(); char[] b = sc.next().toCharArray(); Arrays.sort(a); Arrays.sort(b); System.out.println(Arrays.equals(a, b) ? "YES" : "NO"); } }