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