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