//简单粗暴,要你变好
#include<iostream>
#include<cstring>
#include<unordered_map>
using namespace std;
int main()
{
string a,b;
cin>>a>>b;
unordered_map<char,int> S;
for(auto c:a) S[c]++;
for(auto c:b) S[c]--;
int sp=0,sn=0;
for(auto item :S)
if(item.second>0) sp+=item.second;
else sn-=item.second;
if(sn) printf("No %d\n",sn);
else printf("Yes %d\n",sp);
return 0;
}