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