#include <bits/stdc++.h>
using namespace std;
int main() {
  int a, b;
  string s;
  cin >> a >> b >> s;
  if (s.length() != (a + b + 1)) {
    cout << "No";
  } else {
    if (s.find("-") == a) {
      cout << "Yes";
    } else {
      cout << "No";
    }
  }
}
