#include #include using namespace std; int main() { // 入力 string a, b; cin >> a >> b; sort(a.begin(), a.end()); sort(b.begin(), b.end()); // 解答 cout << (a == b ? "YES" : "NO") << endl; return 0; }