#include<iostream> #include<string> using namespace std; int main() { double n,c=0; string s1,s2; cin>>n>>s1>>s2; for(int i=0;i<s1.size();i++)if(s1[i]==s2[i])c++; if(c/s1.size()>=n)cout<<"yes"; else cout<<"no"; }