import java.util.*;
public class Main{
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        String s1 = sc.next();
        String s2 = sc.next();
        int[] v1 = new int[26];//统计短串各字符个数
        int[] v2 = new int[26];//统计长串各字符个数
        for(int i = 0; i < s1.length(); ++i) v1[s1.charAt(i) - 'a']++;
        for(int i = 0; i < s2.length(); ++i) v2[s2.charAt(i) - 'a']++;
        for(int i = 0; i < 26; ++i){
            if(v1[i] > v2[i]){//短串某字符个数多于长串相应字符个数,就false
                System.out.println("false");
                return;
            }
        }
        System.out.println("true");//全小于等于,就true
    }
}