#include <bits/stdc++.h>
using namespace std;
int main(void) {
  int A, B;
  cin >> A >> B;
  string s;
  cin >> s;
  string ans = "Yes";
  if (s.size() != A + B + 1) ans = "No";
  if (s[A] != '-') ans = "No";
  for (int i = 0; i < s.size(); i++) {
    if (s[i] == '-') {
      ans = "No";
      break;
    }
  }
  cout << ans << endl;
  return 0;
}
