S, T = input().split()
T_dic = dict()
for ch in T:
T_dic[ch] = T_dic.setdefault(ch, 0) + 1
flag = 1
for ch in S:
if ch not in T_dic:
flag = 0
break
elif T_dic[ch] <= 0:
flag = 0
break
else:
T_dic[ch] -= 1
if flag == 0:
print("false")
else:
print("true")
""""
一种借助字典的思路,时间复杂度较低
"""
from collections import Counter
if __name__ == "__main__":
s, t = map(dict, map(Counter, input().strip().split()))
flag = True
for c in s.keys():
if c not in t.keys() or s[c] > t[c]:
flag = False
break
print("true" if flag else "false")