#include <bits/stdc++.h>
using namespace std;
const int MAXN = 50 * 50;
int main() {
  ios_base::sync_with_stdio(0);
  int A, B;
  cin >> A >> B;
  string s;
  cin >> s;
  if (s.length() != A + B + 1)
    cout << "No";
  else {
    if (s[A] == '-') {
      for (int i = 0; i < s.length(); i++) {
        if (i != A) {
          if (!(s[i] >= '0' && s[i] <= '9')) {
            cout << "No";
            break;
          } else if (i == s.length() - 1)
            cout << "Yes";
        }
      }
    } else
      cout << "NO";
  }
  return 0;
}
