#include <bits/stdc++.h>
using namespace std;
int main() {
  int A, B, i, x = 0;
  string S;
  cin >> A >> B >> S;
  for (i = 0; i <= A + B; i++) {
    if (i == A) {
      if (S[i] == '-') {
        x++;
      }
    } else {
      if (S[i] == '1' || S[i] == '2' || S[i] == '3' || S[i] == '4' ||
          S[i] == '5' || S[i] == '6' || S[i] == '7' || S[i] == '8' ||
          S[i] == '9') {
      } else {
        x = -100;
      }
    }
  }
  if (S.size() == A + B + 1) {
    x++;
  }
  if (A >= 0 && A <= 5) {
    if (B >= 0 && B <= 5) {
      if (x == 2) {
        cout << "Yes" << endl;
      }
    }
  } else {
    cout << "No" << endl;
  }
}
