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