#include <bits/stdc++.h>
int main() {
  int A, B;
  std::cin >> A >> B;
  std::string s;
  std::cin >> s;
  for (int i = 0; i < A; ++i) {
    if (s[i] < '0' || s[i] > '9') {
      std::cout << "No\n";
      return 0;
    }
  }
  if (s[A] != '-') {
    std::cout << "No\n";
    return 0;
  }
  for (int i = B; i < s.size(); ++i) {
    if (s[i] < '0' || s[i] > '9') {
      std::cout << "No\n";
      return 0;
    }
  }
  std::cout << "Yes\n";
  return 0;
}
