import java.util.ArrayList; import java.util.Arrays; import java.util.List; import java.util.Scanner; public class Main{ public static void main(String[] args) { Scanner scan = new Scanner(System.in); String A = scan.next(); String B = scan.next(); scan.close(); List str = new ArrayList<>(Arrays.asList(A.split(""))); //System.out.println(str.size()); for(int i = 0; i < A.length(); i++) { String s = B.substring(i, i + 1); boolean flag = true; for(int j = 0; j < str.size(); j++) { if(s.equals(str.get(j))) { str.remove(j); flag = false; break; } } if(flag) { System.out.println("NO"); System.exit(0); } } System.out.println("YES"); } }