#include<bits/stdc++.h>
using namespace std;
#define vi vector<int>
#define vvi vector<vi>
#define vs vector<string>
#define pb push_back
#define P pair<int,int>
#define vp vector<P>
#define PP pair<int,P>
#define vpp vector<PP>
#define fi first
#define se second
#define INF (1<<30)
#define MOD 1000000007
#define REP(i,n) for(int i=0;i<n;i++)
#define REPR(i,n) for(int i=n;i>=0;i--)
#define FOR(i,m,n) for(int i=m;i<n;i++)
#define all(x) (x).begin(),(x).end()
int main(){
    int a,b;
    cin>>a>>b;
    string st;
    cin>>st;
    bool f=true;
    REP(i,a){
        if('0'<=st[i]&&st[i]<='9'){
            continue;
        }
        f=false;
    }
    if(st[i]!='-'){
        f=false;
    }
    REP(i,b){
        if('0'<=st[a+i+1]&&st[a+i+1]<='9'){
            continue;
        }
        f=false;
    }
    if(f){
        cout<<"Yes"<<endl;
    }else{
        cout<<"No"<<endl;
    }
    return 0;
}