#include #include #include using namespace std; static void setup() { cin.tie(0); ios::sync_with_stdio(false); } static void run() { string a, b; cin >> a >> b; std::sort(begin(a), end(a)); std::sort(begin(b), end(b)); const auto same = a == b; cout << (same ? "YES" : "NO") << endl; } int main(int argc, char **argv) { setup(); run(); return 0; }