#include #include using namespace std; int main() { string A, B, answer; cin >> A >> B; for (unsigned int j = 0; j < A.length(); j++){ int countA = 0; int countB = 0; for (unsigned int i = 0; i < A.length(); i++){ if (A[j] == A[i]){ countA++; } if (A[j] == B[i]){ countB++; } } if (countA == countB){ answer = "YES"; } else if (countA != countB){ answer = "NO"; break; } } cout << answer << endl; }