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