print('Yes' if sorted(list(input())) == sorted(list(input())) else 'No')