#include #include using namespace std; int main() { string A, B; char soat; int byte, i = 0; cin >> A >> B; for (int i = 0; i < B.length();i++) { for (int j =i ; j < A.length(); j++) { if (B[i] == A[j]) { soat = A[i]; A[i] = A[j]; A[j] = soat; } } //cout << A << endl; } //cout << A << endl << B << endl; if (A == B) { cout << "YES" << endl; } else { cout << "NO" << endl; } return 0; }