#include <iostream>
#include<string>
using namespace std;
int main(void){
    int A,B;
    string S;
    bool can = false;
    
    cin>>A>>B>>S;
    
    if(S[A] == '-' ){
        for(int i=0; i<A;i++){
            for(int j=0;j<=9;j++){
                if(S[i] - '0' == j) can = true;
            }
        }
        if(!can) continue;
        can=false;
        for(int i=A; i<S.size();i++){
            for(int j=0;j<=9;j++){
                if(S[i] - '0' == j) can = true;
            }
        }
    }
    
    else can = false;
    
    if(can) cout<<"Yes\n";
    else cout<<"No\n";
    
    
}
