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