#include <bits/stdc++.h>
int main() {
  int a, b, flag = 0;
  std::string s;
  std::cin >> a >> b >> s;
  for (int i = 0; i < a; ++i) {
    if (isdigit(s[i]) != 0) flag = 1;
  }
  for (int i = 0; i < b; ++i) {
    if (isdigit(s[i + a]) != 0) flag = 1;
  }
  if (flag == 1) {
    std::cout << "Yes" << std::endl;
  } else {
    std::cout << "No" << std::endl;
  }
  return 0;
}
