if __name__ == "__main__": str1 = input() str2 = input() ans = "YES" for j in str1: num = str2.find(j) if num == -1: ans = "NO" break else: str2 = str2[:num] + str2[num+1:] print(ans)