#include <bits/stdc++.h>
using namespace std;
int main() {
  int a, b;
  string s, former, latter;
  cin >> a >> b;
  cin >> s;
  former = "";
  latter = "";
  for (int i = 0; i < a; i++) {
    former += s[i];
  }
  for (int i = a + 2; i < a + b + 1; i++) {
    latter += s[i];
  }
  if (regex_search(former, regex("[0-9]")) &&
      regex_search(latter, regex("[0-9]")) && s[a] == '-')
    printf("Yes");
  else
    printf("No");
  return 0;
}
