#include #include #include using namespace std; using ll = long long; //69 int main() { char s[11]; int count[26] = { 0 }; scanf("%s", s); for (int i = 0; s[i] != 0; i++) count[s[i] - 'a']++; scanf("%s", s); for (int i = 0; s[i] != 0; i++) count[s[i] - 'a']--; int match = 0; for (int i = 0; i < 26; i++) if (count[i] != 0) match++; printf("%s\n", match ? "NO" : "YES"); }