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