python
k = float(input())
a = input()
b = input()
cnt = 0
for i in range(len(a)):
if a[i] == b[i]:
cnt += 1
if cnt / len(a) >= k:
print("yes")
else:
print("no")
c++
#include <iostream>
#include <string>
#include <algorithm>
using namespace std;
int main()
{
double k; string a, b;
cin >> k >> a >> b;
int cnt = 0;
for (int i = 0; i < a.size(); i ++) {
if (a[i] == b[i]) cnt ++;
}
if (cnt*1.0 / a.size() >= k) puts("yes");
else puts("no");
return 0;
}