#include <bits/stdc++.h>
using namespace std;
string solve(int A, int B, string S) {
  bool answer = true;
  if ((A >= 1) && (B <= 5) && (S[A] == '-')) {
    for (int i = 0; i < (A + B + 1); i++)
      if ((('0' >= S[i]) || (S[i] >= '9')) && (i != A)) answer &= false;
  } else
    answer = false;
  return (answer) ? "Yes" : "No";
}
int main() {
  int A, B;
  string S;
  cin >> A >> B >> S;
  cout << solve(A, B, S) << endl;
}
