using System;
public class Program
{
public static bool Are50PercentEqual(string str1, string str2) {
if (string.IsNullOrEmpty(str1) || string.IsNullOrEmpty(str2) || str1.Length != str2.Length) {
return false;
}
int matchingChars = 0;
for (int i = 0; i < str1.Length; i++) {
if (str1[i] == str2[i]) {
matchingChars++;
}
}
return (double)matchingChars / str1.Length >= 0.5;
}
public static void Main(string[] args)
{
string str1 = "java c# c c++ python";
string str2 = "java c# c r rust sql";
if (Are50PercentEqual(str1, str2)) {
Console.WriteLine("yes");
}
else {
Console.WriteLine("no");
}
}
}
/*
run:
yes
*/