#include <bits/stdc++.h>
using namespace std;
int A, B;
char s[12];

int main(){
  cin >> A B;
  cin >> s;
  
  for(int i=0; i<A; i++){
    if (!(0 <= s[i] && s[i] <= 9)){
      cout << "No" << endl;
      return 0;
    }
  }
  if (s[A] != '-'){
    cout << "No" << endl;
    return 0;
    }
    for(int i=A+1; i<=A+B; i++){
      if (!(0 <= s[i] && s[i] <= 9)){
        cout << "No" << endl;
        return 0;
      }
    } 
  cout << "Yes" << endl;
}