#include using namespace std; int main(){ int N; cin>>N; string S,T; cin>>S>>T; int A=0,B=0,C=0; for(int i=0;iT[i]) C=1; if(S[i]!=T[i]){ A++; if(T[i]-S[i]==2) B++; } } if((A+B)%2==0&&C==0&&(A!=1||B!=1)){ cout<<"Yes\n"; } else{ cout<<"No\n"; } }