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