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