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

int main(){
  int a,b,i;
  string s;
  cin>>a>>b;
  cin>>s;
  if(s[a]!='-'){
    cout<<"No";
    return 0;
  }
  for(i=0;i<a;i++){
    if('0'>s[i] || s[i]>'9'){
      cout<<"No";
      return 0;
    }
  }
  for(i=a+1;i<b;i++){
    if('0'>s[i] || s[i]>'9'){
      cout<<"No";
      return 0;
    }
  }
  cout<<"Yes";