#include <bits/stdc++.h>
using namespace std;
int main() {
  int A, B;
  cin >> A >> B;
  for (int i = 0; i < A + B; i++) {
    char S;
    cin >> S;
    if (0 <= i & i <= A - 1) {
      if (48 <= S & S <= 57) {
        continue;
      } else {
        cout << "No" << endl;
        return 0;
      }
    } else if (i == A) {
      if (S == '-') {
        continue;
      } else {
        cout << "No" << endl;
        return 0;
      }
    } else if (A + 1 <= i & i <= B) {
      if (48 <= S & S <= 57) {
        continue;
      } else {
        cout << "No" << endl;
        return 0;
      }
    }
  }
  cout << "Yes" << endl;
}
