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