#include #include using namespace std; int main() { int flag=0; char a[10] = {}, b[10] = {}; char c[10] = {}; cin >> a >> b; for (int i = 0;i < 10;i++) { for (int j = 0;j < 10;j++) { if (a[i] == b[j]) { c[i] = b[j]; b[j] = '^'; break; } } for (int i=0;i<10;i++) if (a[i] == c[i]) { flag = 1; } else { flag = 0; break; } } if (flag == 0) { cout << "NO"; } else { cout << "YES"; } cout << endl; return 0; }