#include #include #include #include #include #include using namespace std; #define diff(x,y) ((x > y) ? (x - y) : (y - x)) #define us(x) (x > 0) ? x : x * -1 int main() { string a, b; cin >> a >> b; sort(a.begin(), a.end()); sort(b.begin(), b.end()); for (int i = 0; i < a.size(); i++) { if (a[i] != b[i]) { cout << "NO" << endl; return 0; } } cout << "YES" << endl; return 0; }