#include<iostream>
using namespace std;
int main(){
    int a,b;    cin>>a>>b;
    char s[a+b+2];  cin>>s;
    for(int i=0;i<a+b+2;i++)if(s[i]!='-'&&i==a||s[i]=='-'&&i!=a){cout<<"No"<<endl;return 0;}
    cout<<"Yes"<<endl;
    return 0;
}