#include<bits/stdc++.h>
using namespace std;
char s[100001];
int main()
{
    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]<'0'&&i!=a+1||s[i]>'9'&&i!=a+1)
        {
            cout<<"No"<<endl;
            return 0;
        }
    }
    if (s[a+1+1]!='-') cout<<"No"<<endl,return 0;
    cout<<"Yes"<<endl;
    return 0;
}