#include<math.h>
#include <bits/stdc++.h>
#include <algorithm>
#define rep(i, n) for (int i = 0; i < (int)n; i++)
#define ll long long int
#define py printf("Yes\n")
#define pn printf("No\n")
#define in cin>>
using namespace std;
const int INF = 1001001001;

int main()
{
    int a,b;
    char s[12];
    bool aflag=true;
    bool bflag=true;
    bool haiflag=true;


    in a>>b>>s;
    for(int i=0;i<a;i++)if(!('0'<=s[i]&&s[i]<='9'))aflag=false;
    if(s[a]!='-')bflag=false;
    for(int i=a+1;i<b;i++)if(!('0'<=s[i]&&s[i]<='9'))haiflag=false;
    if(aflag&&bflag&&haiflag)puts("Yes");
    else puts("No")
}
