import java.util.Scanner; class Main{ public static void main(String[] args) { Scanner sc = new Scanner(System.in); int[] list = new int [26]; String str = sc.next(); char[] array = str.toCharArray(); for(char ch:array) { if(ch - 'a' < 26)list[ch - 'a']++; } str = sc.next(); char[] array2 = str.toCharArray(); for(char ch:array2) { if(ch - 'a' < 26)list[ch - 'a']--; } for(int i:list) { if(i != 0) { System.out.println("NO"); return; } } System.out.println("YES"); } }