#include <bits/stdc++.h>
using namespace std;
vector<string> v;
vector<int> x;
string s;
string ans = "Yes";
int main() {
  int a, b;
  cin >> a >> b >> s;
  for (int i = 0; i < a; i++) {
    if (s[i] == '-') ans = "No";
  }
  if (s[a] == '-') {
    for (int i = 0; i < b; i++) {
      if (s[i] == '-') ans = "No";
    }
  } else {
    ans = "No";
  }
  cout << ans << endl;
  return 0;
}
