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