#include <bits/stdc++.h>
int main(void) {
  int A, B;
  std::string s;
  std::cin >> A >> B;
  std::cin >> s;
  bool post_number = true;
  for (int i = 0; i < A; i++) {
    if (s[i] == '-') post_number = false;
  }
  if (s[A] != '-') post_number = false;
  for (int i = A + 1; i <= B; i++) {
    if (s[i] == '-') post_number = false;
  }
  if (post_number) {
    std::cout << "Yes" << std::endl;
  } else {
    std::cout << "No" << std::endl;
  }
  return 0;
}
