s = input()
t = input()


def isAnagram(s,t):
    sSorted = sorted(s)
    tSorted = sorted(t)

    if sSorted == tSorted:
        print("Yes")
    else:
        print("No")


isAnagram(s,t)
ffc6f199c7024a5d9c1d3d3eec04bfbe72ff2777
<mask token>

<mask token>


def isAnagram(s, t):
    sSorted = sorted(s)
    tSorted = sorted(t)
    if sSorted == tSorted:
        print('Yes')
    else:
        print('No')


<mask token>

<mask token>


def isAnagram(s, t):
    sSorted = sorted(s)
    tSorted = sorted(t)
    if sSorted == tSorted:
        print('Yes')
    else:
        print('No')


isAnagram(s, t)

s = input()
t = input()


def isAnagram(s, t):
    sSorted = sorted(s)
    tSorted = sorted(t)
    if sSorted == tSorted:
        print('Yes')
    else:
        print('No')


isAnagram(s, t)

s = input()
t = input()


def isAnagram(s,t):
    sSorted = sorted(s)
    tSorted = sorted(t)

    if sSorted == tSorted:
        print("Yes")
    else:
        print("No")


isAnagram(s,t)