#include<bits/stdc++.h>
using namespace std;

int A, B;
string S;
#define yes "Yes"
#define no "No"

string solve() {
  bool answer = true;
  if ((1<=A) && (B<=5) && (S[A]=='-') && (sizeof(S)==(A+B+2)) {
    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() {
  cin >> A >> B >> S;
  cout << solve() << endl;
}
