#include <bits/stdc++.h>
using namespace std;
int main(){
string a, b;
while(cin >> a >> b){
unordered_map<char, int> x, y;
for(auto it: a) x[it]++;
for(auto it: b) y[it]++;
cout << (x == y ? "yes\n" : "no\n");
}
}