#include<iostream>
using namespace std;
int a,b,t,f;
string s; 
int main()
{     
    cin>>a>>b;
    cin>>s;
    for (int i=0;i<(a+b+1);i++)
    if (s[i]!='0'&&s[i]!='1'&&s[i]!='2'&&s[i]!='3'&&s[i]!='4'&&s[i]!='5'&&s[i]!='6'&&s[i]!='7'&&s[i]!='8'&&s[i]!='9'&&i!=a+1) {t++;f=i;}
    if (t==1&&s[f]=='-') cout<<"YES";
    else cout<<"NO";                      
 }    