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