
#include<bits/stdc++.h>
using namespace std;

#define ll      long long
#define MAX     1000007
#define inf     99999999999999
#define MOD     1000000007
#define pii     pair<int,int>
#define FIN     freopen("input.txt","r",stdin);
#define FOUT    freopen("output.txt","w",stdout);

int main ()
{
    ll a,b;
    string s;
    scanf("%lld %lld",&a,&b);
    cin>>s;
    for(int i=0;i<s.size();i++)
    {
        if(s[i]=='-' && i!=a)
        {
            printf("No\n");
            return 0;
        }
    }
    if(s.size()!=(a+b+1) || s[a]!='-')
    {
        printf("No\n");
        return 0;
    }
    printf("Yes\n");
    return 0;
}
