#include<bits/stdc++.h>
using namespace std;
char s[100005];
int main(int argc, char **argv){
    int a,b;
    cin>>a>>b;
    for(int i=1;i<=a+b+1;i++) cin>>s[i];
    for(int i=1;i<=a+b+1;i++)
    {
        if(s[i]<48&&i!=a+1||s[i]>58&&i!=a+1)
        {
            cout<<"No"<<endl;
            exit(0);
        }
        if(i==a+1&&s[i]!='-')
        {
            cout<<"No\r\n";
            return 0;
        }
    }
    cout<<"Yes";
putcahr('\n');
}