#include #include #include using namespace std; int main() { std::cin.tie(0); std::ios::sync_with_stdio(false); string A, B; cin >> A; cin >> B; sort(A.begin(), A.end()); sort(B.begin(), B.end()); // cout << A << endl; // cout << B << endl; if(A == B) cout << "YES" << endl; else cout << "NO" << endl; return 0; }